dev-utils

1.2.3 • Public • Published

It's just another node module, which is intended to perform common functionalities used by developers, more easier.

Installation

npm install dev-utils

Usage

You can just instantiate the module and call the functions whereever applicable.

  var dev = require('dev-utils');
 
  dev.date(); //return time in milliseconds
  dev.today(); // returns current date, which database accepts
  dev.random(10); // generate a random unique alphanumeric string of given length
  dev.uppercase('hello'); //converts given string to uppercase
  dev.lowercase('HeLLo'); // converts given string to lowercase
  dev.makeobject(someobject); // return "keys" having some value, removes undefined/null/empty values
  dev.decamelize('thisIsCamel'); // you can pass separator as second parameter
  dev.defined(a, b, c...); // returns first value which is found not undefined i.e `!== undefined`
  dev.thisToArray('somestring'); // returns an array with that string, empty array if nothing is passed
  dev.unique([1,3,5,22,3,5]); // returns unique elements from given array
  dev.permutate(['aa','b','c'],[1,23,6,7],['p','q']); // returns all possible combinations array data //cartesian
 

Installing dev-utils

  [sudo] npm install dev-utils

Author: Srikanth Enjamoori

Package Sidebar

Install

npm i dev-utils

Weekly Downloads

0

Version

1.2.3

License

ISC

Unpacked Size

5.59 kB

Total Files

3

Last publish

Collaborators

  • srikanthenjamoori