yiwn-merge

0.0.1 • Public • Published

merge

Copy enumerable properties of source to target object.

Installation

Using component

$ component install yiwn/merge

Using npm for browserify

$ npm install yiwn-merge

Usage

Example:

var merge = require('yiwn-merge');
 
var obj1, obj2;
 
obj1 = { a: 1, b: null };
obj2 = { c: 3, b: 2 };
 
merge(obj1, obj2); // -> { a: 1, b: null, c: 3 }
merge(obj1, obj2, true); // -> { a: 1, b: 2, c: 3 }

Test

Run tests with mocha

$ make test

License

The MIT License

/yiwn-merge/

    Package Sidebar

    Install

    npm i yiwn-merge

    Weekly Downloads

    1

    Version

    0.0.1

    License

    MIT

    Last publish

    Collaborators

    • antaranian