Popularity
5.0
Growing
Activity
3.1
Growing
919
19
82

Code Quality Rank: L5
Monthly Downloads: 0
Programming language: JavaScript
License: MIT License
Tags: Polyfills     Java Script     Browser     Ecmascript     Object     ES2015     Ponyfill     Polyfill     Shim     Prollyfill     Harmony     Properties     Extend     Assign    
Latest version: v4.1.1

object-assign alternatives and similar modules

Based on the "Java Script" category.
Alternatively, view object-assign alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of object-assign or a related project?

Add another 'Java Script' Module

README

object-assign

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


Get professional support for this package with a Tidelift subscription Tidelift helps make open source sustainable for maintainers while giving companiesassurances about security, maintenance, and licensing for their dependencies.