Skip to content

FerLuisxd/addPropertyToObject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A simple and easy to use library to add properties to an object with an especific index

Usage:

let addProperty = require('add-property-to-object')
let obj = { place: "New World Pizza", location: 200 };
obj = addProperty(obj,{ especialty: "Pizza", dishes: [{ name: "American" }, { name: "Full Meat" }] }, 0);
console.log(obj);
//Obj now =
// {
//     especialty: 'Pizza',
//     dishes: [ { name: 'American' }, { name: 'Full Meat' } ],
//     place: 'New World Pizza',
//     location: 200
// }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published