1 [![Build Status][travis-svg]][travis-url]
2 [![dependency status][deps-svg]][deps-url]
3 [![dev dependency status][dev-deps-svg]][dev-deps-url]
5 # extend() for Node.js <sup>[![Version Badge][npm-version-png]][npm-url]</sup>
7 `node-extend` is a port of the classic extend() method from jQuery. It behaves as you expect. It is simple, tried and true.
11 This package is available on [npm][npm-url] as: `extend`
19 **Syntax:** extend **(** [`deep`], `target`, `object1`, [`objectN`] **)**
21 *Extend one object with one or more others, returning the modified object.*
23 Keep in mind that the target object will be modified, and will be returned from extend().
25 If a boolean true is specified as the first argument, extend performs a deep copy, recursively copying any objects it finds. Otherwise, the copy will share structure with the original object(s).
26 Undefined properties are not copied. However, properties inherited from the object's prototype will be copied over.
27 Warning: passing `false` as the first argument is not supported.
31 * `deep` *Boolean* (optional)
32 If set, the merge becomes recursive (i.e. deep copy).
36 The object that will be merged into the first.
37 * `objectN` *Object* (Optional)
38 More objects to merge into the first.
42 `node-extend` is licensed under the [MIT License][mit-license-url].
46 All credit to the jQuery authors for perfecting this amazing utility.
48 Ported to Node.js by [Stefan Thomas][github-justmoon] with contributions by [Jonathan Buchanan][github-insin] and [Jordan Harband][github-ljharb].
50 [travis-svg]: https://travis-ci.org/justmoon/node-extend.svg
51 [travis-url]: https://travis-ci.org/justmoon/node-extend
52 [npm-url]: https://npmjs.org/package/extend
53 [mit-license-url]: http://opensource.org/licenses/MIT
54 [github-justmoon]: https://github.com/justmoon
55 [github-insin]: https://github.com/insin
56 [github-ljharb]: https://github.com/ljharb
57 [npm-version-png]: http://vb.teelaun.ch/justmoon/node-extend.svg
58 [deps-svg]: https://david-dm.org/justmoon/node-extend.svg
59 [deps-url]: https://david-dm.org/justmoon/node-extend
60 [dev-deps-svg]: https://david-dm.org/justmoon/node-extend/dev-status.svg
61 [dev-deps-url]: https://david-dm.org/justmoon/node-extend#info=devDependencies