mixin-object NPM version

Mixin the own and inherited properties of other objects onto the first object. Pass an empty object as the first arg to shallow clone.

If you only want to combine own-properties, use extend-shallow.

Install

Install with npm

sh $ npm i mixin-object --save

Install with bower

sh $ bower install mixin-object --save

Usage

```js var mixin = require('mixin-object');

var obj = {c: 'c'}; var foo = mixin({a: 'a'}, {b: 'b'}); console.log(foo); //=> {c: 'c', a: 'a', b: 'b'} console.log(obj); //=> {c: 'c'}

mixin({}, {a: 'a'}, {b: 'b'}); //=> {a: 'a', b: 'b'} ```

Related

Running tests

Install dev dependencies:

sh $ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Jon Schlinkert

License

Copyright © 2014-2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on July 05, 2015.