Files
NativeScript/packages/core/utils/module-merge.ts
2020-11-11 08:46:36 -08:00

8 lines
393 B
TypeScript

// This method iterates all the keys in the source exports object and copies them to the destination exports one.
// Note: the method will not check for naming collisions and will override any already existing entries in the destination exports.
export function merge(sourceExports: any, destExports: any) {
for (const key in sourceExports) {
destExports[key] = sourceExports[key];
}
}