0.1.8 • Published 4 years ago
utilitary-functions v0.1.8
Install
$ npm install utilitary-functions
Docs
Functions
• parseMS - parse milliseconds to a object.
Classes
• object - manages a object. forEachProperty - executes a function for each object property.
package
• version - returns the current version of the package.
Examples
forEachObjectProperty
const util = require('utilitary-functions');
const obj = {
viitor: {
blacklist: true,
},
nicky: {
blacklist: true,
},
clown: {
blacklist: false
}
};
let list = null;
util.forObjectEachProperty(result => {
if(!list) {
list = obj[result][blacklist];
} else {
list = `${list}, ${obj[result][blacklist]}`;
};
});
console.log(list) // true, true, false
ms parser
const util = require('utilirary-functions');
console.log(util.parseMS(5000000))
/*
{
days: 0,
hours: 1,
minutes: 23,
seconds: 20,
milliseconds: 0,
microseconds: 0,
nanoseconds: 0
*/
Changelog
• Fixed README.md
Communication
If you want to talk with me, here's my discord tag: "Clown#8070" :)