Add Props
Easiest way to add props and values to the object
Installation
npm install add-props
Usage
const addProps = ; var myObject = {}; // Just create properties structure; /*{ "click": { "url": {} }}*/ // Add value to the property; /*{ "events": { "tracker": { "pixel": { "url": 12346789 } } }}*/ // Create multiple properties and fill them with the same value; /*{ "stat": { "user_id": "id123456789" }, "html": { "footer": { "block_id": "id123456789" } }}*/ // Create multiple properties with own values; /*{ "video": { "duration": 120.459 }, "audio": { "sound": { "muted": true } }}*/ console;
Also you can create new object with specified props. Just skip the first argument like so:
var new_object = ;