0.1.8 • Published 4 years ago

utilitary-functions v0.1.8

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

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" :)

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.5

4 years ago