|
|
|
|
@ -744,30 +744,6 @@ export function untrack(fn) {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param {Record<string | symbol, unknown>} obj
|
|
|
|
|
* @param {Array<string | symbol>} keys
|
|
|
|
|
* @returns {Record<string | symbol, unknown>}
|
|
|
|
|
*/
|
|
|
|
|
export function exclude_from_object(obj, keys) {
|
|
|
|
|
/** @type {Record<string | symbol, unknown>} */
|
|
|
|
|
var result = {};
|
|
|
|
|
|
|
|
|
|
for (var key in obj) {
|
|
|
|
|
if (!keys.includes(key)) {
|
|
|
|
|
result[key] = obj[key];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (var symbol of Object.getOwnPropertySymbols(obj)) {
|
|
|
|
|
if (Object.propertyIsEnumerable.call(obj, symbol) && !keys.includes(symbol)) {
|
|
|
|
|
result[symbol] = obj[symbol];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Possibly traverse an object and read all its properties so that they're all reactive in case this is `$state`.
|
|
|
|
|
* Does only check first level of an object for performance reasons (heuristic should be good for 99% of all cases).
|
|
|
|
|
|