observed-extend

0.0.1 • Public • Published

observed-extend

Description

Deep merge an Object and return true if there actually happened a change on the target object

Usage

npm install observed-extend
var extend = require('observed-extend');
 
var target = {foo: 0};
 
var isChanged = extend(target, {foo: 0}); // isChanged is false, target stays unchanged
var isChanged = extend(target, {foo: 1}); // isChanged is true, target is {foo: 1} now

For information about how the clone works internally, view source in index.js

License

Copyright 2014, Hobbyquaker hq@ccu.io MIT License

derived from:

node.extend

https://github.com/dreamerslab/node.extend
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license

is

https://github.com/enricomarino/is
the definitive JavaScript type testing library
copyright 2013-2014 Enrico Marino / Jordan Harband
license MIT

Package Sidebar

Install

npm i observed-extend

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • hobbyquaker