Skip to content

Overwrite

Malexion edited this page Nov 3, 2016 · 1 revision

new __.lib.Overwrite(payload)

  • payload Object or Array payload to deliver, best used with deep: true fuse operations.

Examples

var sample = {
   array1: [ 1, 2, 3, 4, 5 ],
   array2: [ 1, 2, 3, 4, 5 ]
};

var addition = {
   array1: [ 5, 4 ],
   array2: new __.lib.overwrite([ 5, 4 ])
};

console.log(__.fuse(sample, addition, { deep: true }));