delegate-properties
Deep-clone properties from one object to another and make them non-enumerable, or make existing properties on an object non-enumerable.
Install
Install with npm:
$ npm install --save delegate-properties
Usage
var delegate = ;;
Params
receiver
: (Object) The object receiving propertiesprovider
: (Object) The object providing properties
Examples
copy properties
Copy properties and make them non-enumerable
var provider = { return val; } { return val; }; var receiver = {};// an existing properties in the `receiver` // object would be overwritten; receiver;receiver; console; // 'FOO' console; // 'bar' // copied properties are non-enumerableconsole; // {}console; // []
make existing properties non-enumerable
var obj = { return val; } { return val; }; ;console // {}obj // 'FOO'obj // 'bar'
About
Related projects
- define-property: Define a non-enumerable property on an object. | homepage
- delegate-object: Copy properties from an object to another object, where properties with function values will be… more | homepage
- forward-object: Copy properties from an object to another object, where properties with function values will be… more | homepage
- mixin-deep: Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | homepage
- mixin-object: Mixin the own and inherited properties of other objects onto the first object. Pass an… more | homepage
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
$ npm install -g verb verb-generate-readme && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb-generate-readme, v0.1.30, on August 13, 2016.