Newtonian Physics Mockumentary
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@extra-object/concat-update

2.2.3 • Public • Published

Combines entries from objects, preferring last. 🏃 📼 📦 🌔 📒

Alternatives: concat, concat$.
This is part of package extra-object.

object.concat$(x, ...ys);
// x:  an object (updated)
// ys: other objects
// --> x
const object = require('extra-object');
 
var x = {a: 1, b: 2};
var y = {c: 3, d: 4};
object.concat$(x, y);
// { a: 1, b: 2, c: 3, d: 4 }
 
x;
// { a: 1, b: 2, c: 3, d: 4 }
 
var x = {a: 1, b: 2};
var z = {d: 40, e: 50};
object.concat$(x, y, z);
// { a: 1, b: 2, c: 3, d: 40, e: 50 }

references

Install

npm i @extra-object/concat-update

DownloadsWeekly Downloads

0

Version

2.2.3

License

MIT

Unpacked Size

3.66 kB

Total Files

9

Last publish

Collaborators

  • avatar