JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2179623
  • Score
    100M100P100Q187857F
  • License

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

Package Exports

  • mixin-object

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 (mixin-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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 with npm

npm i mixin-object --save

Usage

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'}

Running tests

Install dev dependencies.

npm i -d && npm test

Author

Jon Schlinkert

Other javascript/node.js utils

Other projects that I maintain:

License

Copyright (c) 2015 Jon Schlinkert
Released under the MIT license


This file was generated by verb on February 25, 2015.