concat-objects

1.0.1 • Public • Published

Installations

npm i concat-objects

What ?

With this module you can simply join two or more objects, If objects have same property than last object with that property's value will be used

How ?

const concatObject = require('concat-objects');

const mergedObject = concatObject(
    { name: "Shisui" },
    { address: "Unknown" },
    { address: "India" },
    { age: 69, weight: 69 },
);

console.log(mergedObject); // => { name: 'Shisui', address: 'India', age: 69, weight: 69 }

Alternative

// I didn't knew about this alternative when I made this package xD
// just do this
const a = {
    name: "someName",
    last: "kek"
},
b = {
    age: 14
},
c = {
    hobby:["gaming]
}

const person = Object.assign(a, b, c);

Supports

For support or issues or queries contace me on my discord server.

Readme

Keywords

Package Sidebar

Install

npm i concat-objects

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

1.98 kB

Total Files

3

Last publish

Collaborators

  • shisui