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

10 lines
218 B
TypeScript

export function omit(originalObject: {}, keysToOmit: string[]): {} {
const cloneObject = { ...originalObject };
for (const path of keysToOmit) {
delete cloneObject[path];
}
return cloneObject;
}