Socket
Socket
Sign inDemoInstall

dev-utils

Package Overview
Dependencies
0
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    dev-utils

Just another node module which provides common util functions required in development.


Version published
Maintainers
1
Install size
5.60 kB
Created

Readme

Source

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

Keywords

FAQs

Last updated on 20 Feb 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc