assign-all
v1.0.0
Published
Object.assign for all objects in an array
Downloads
7
Readme
assign-all
Object.assign for all objects in an array
Installation
Install assign-all
using npm:
npm install --save assign-all
Usage
Module usage
var assignAll = require('assign-all');
assignAll([
{foo: 1},
{foo: 2},
{bar: 'baz'}
]);
// {foo: 2, bar: 'baz'}
API
assignAll(arr)
| Name | Type | Description |
|------|------|-------------|
| arr | Array
| The array of objects to merge |
Returns: Object
, the merged object.
License
MIT