AK-21/Graphite-Industrial-Intelligence
0
1# merge-descriptors2 3> Merge objects using their property descriptors4 5## Install6 7```sh8npm install merge-descriptors9```10 11## Usage12 13```js14import mergeDescriptors from 'merge-descriptors';15 16const thing = {17 get name() {18 return 'John'19 }20}21 22const animal = {};23 24mergeDescriptors(animal, thing);25 26console.log(animal.name);27//=> 'John'28```29 30## API31 32### merge(destination, source, overwrite?)33 34Merges "own" properties from a source to a destination object, including non-enumerable and accessor-defined properties. It retains original values and descriptors, ensuring the destination receives a complete and accurate copy of the source's properties.35 36Returns the modified destination object.37 38#### destination39 40Type: `object`41 42The object to receive properties.43 44#### source45 46Type: `object`47 48The object providing properties.49 50#### overwrite51 52Type: `boolean`\53Default: `true`54 55A boolean to control overwriting of existing properties.56 