2.0.4 • Published 5 years ago
extroonie v2.0.4
Extroonie
"Let's just treat object like an array lol" - Extroonie#0001
Requiring Functions
const extroonie = require("extroonie");
Object.prototype.push
This will add the discriminator into the new object.
Usage
const obj = {username: "Extroonie"};
const newObj = obj.push({discriminator: "0001"});
// {username: "Extroonie", discriminator: "0001"}
console.log(newObj)
Object.prototype.remove
This will just simply remove a key and value from an object based on the specified key.
Usage
const obj = {username: "Extroonie", discriminator: "0001"};
// {username: "Extroonie"}
obj.remove("tag")
Object.prototype.forEach
Loop through the object which return an object, example below.
Usage
const obj = {username: "Extroonie", discriminator: "0001"};
obj.forEach(object => {
// {key: "username", value: "Extroonie"}
})