@smui/common
Version:
Svelte Material UI - Common
18 lines • 532 B
JavaScript
export function exclude(obj, keys) {
let names = Object.getOwnPropertyNames(obj);
const newObj = {};
for (let i = 0; i < names.length; i++) {
const name = names[i];
const cashIndex = name.indexOf('$');
if (cashIndex !== -1 &&
keys.indexOf(name.substring(0, cashIndex + 1)) !== -1) {
continue;
}
if (keys.indexOf(name) !== -1) {
continue;
}
newObj[name] = obj[name];
}
return newObj;
}
//# sourceMappingURL=exclude.js.map