sortObject = (obj, keys) => {
	const o = /** @type {T} */ ({});
	for (const k of keys.sort()) {
		o[k] = obj[k];
	}
	return o;
}
@template {object} T
@param {T} obj an object
@param {(keyof T)[]} keys the keys of the object
@returns {T} the object with properties sorted by property name