Package Exports
- extendr
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (extendr) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
extendr
Utilities for cloning, extending, and de-referencing objects in shallow, deep, and safe ways
Install
- Install:
npm install --save extendr
- Use:
require('extendr')
- Install:
npm install --save extendr
- Use:
require('extendr')
- CDN URL:
//wzrd.in/bundle/extendr@3.0.1
- Install:
ender add extendr
- Use:
require('extendr')
Usage
API
require('extendr').extend(target, ...objects)
- shallow extend the properties from the objects into the targetrequire('extendr').deep(target, ...objects)
- deep extend the properties from the objects into the targetrequire('extendr').defaults(target, ...objects)
- shallow extend the properties from the objects into the target where the target's value is undefined or nullrequire('extendr').deepDefaults(target, ...objects)
- deep extend the properties from the objects into the target where the target's value is undefined or nullrequire('extendr').clone(...objects)
- deep extend the properties from the objects into a new objectrequire('extendr').dereferenceJSON(object)
- clones the object by stringifg it, then parsing the result, to ensure all references are destroyed (objects that not plain objects or arrays will be lost)
Implementation
- Extendr arguments can only be plain JavaScript objects, anything else will throw. This is intentional to guarantee consistency of references.
- Object property values that are plain objects or arrays will be dereferenced. All other object types will keep their reference.
History
Discover the release history by heading on over to the HISTORY.md
file.
Contribute
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
Backers
Maintainers
These amazing people are maintaining this project:
Sponsors
No sponsors yet! Will you be the first?
Contributors
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md
file.
License
Unless stated otherwise all works are:
- Copyright © 2013+ Bevry Pty Ltd
- Copyright © 2011-2012 Benjamin Lupton
and licensed under: