hexo/node_modules/ali-oss/lib/common/utils/omit.ts

10 lines
218 B
TypeScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
export function omit(originalObject: {}, keysToOmit: string[]): {} {
const cloneObject = { ...originalObject };
for (const path of keysToOmit) {
delete cloneObject[path];
}
return cloneObject;
}