Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inDemoInstall

object-assign

Package Overview
Dependencies
0
Maintainers
3
Versions
17
Issues
File Explorer

Advanced tools

object-assign

ES2015 `Object.assign()` ponyfill

    4.1.1latest
    Github

Version published
Maintainers
3
Weekly downloads
36,205,715
increased by8.68%

Weekly downloads

Readme

Source

object-assign Build Status

ES2015 Object.assign() ponyfill

Use the built-in

Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari), support Object.assign() :tada:. If you target only those environments, then by all means, use Object.assign() instead of this package.

Install

$ npm install --save object-assign

Usage

const objectAssign = require('object-assign'); objectAssign({foo: 0}, {bar: 1}); //=> {foo: 0, bar: 1} // multiple sources objectAssign({foo: 0}, {bar: 1}, {baz: 2}); //=> {foo: 0, bar: 1, baz: 2} // overwrites equal keys objectAssign({foo: 0}, {foo: 1}, {foo: 2}); //=> {foo: 2} // ignores null and undefined sources objectAssign({foo: 0}, null, {bar: 1}, undefined); //=> {foo: 0, bar: 1}

API

objectAssign(target, [source, ...])

Assigns enumerable own properties of source objects to the target object and returns the target object. Additional source objects will overwrite previous ones.

Resources

License

MIT © Sindre Sorhus

Keywords

FAQs

What is object-assign?

ES2015 `Object.assign()` ponyfill

Is object-assign popular?

The npm package object-assign receives a total of 34,370,271 weekly downloads. As such, object-assign popularity was classified as popular.

Is object-assign well maintained?

We found that object-assign demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 3 open source maintainers collaborating on the project.

Last updated on 16 Jan 2017

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket[email protected]

Product

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc