utility-pro
NPM package which provides some utility functions to make your coding easy :)
command to Install :
npm install utility-pro --save
list of functions contain in this package :
sum()
: To calculate sum of all the numbers in arraysortNumber()
: To sort array of numberremoveDup()
: To remove duplicate elements from arrayremoveDupAndSort()
: To remove duplicate elements from array of number and sort itisEven()
: To check if every element of array is even number or notisPrime()
: To check if given number is prime or notisNull()
: To check if given variable is null or notisUndefined()
: To check if given variable is undefined or notcreateRandomEmail()
It will create a random email for youcreateRandomWord()
It will create a random word of desire number of alphabet for youcreateRandomPhoneNumber()
It will create a random phone number for youcreateRandomURL()
It will create a random url of desire length for youcreateRandomIP()
It will create a random IPv4 for you
Example:
const utilPro = ;const a;const arr = 3244217594;console; // 41console; // [ 1, 2, 2, 3, 4, 4, 4, 5, 7, 9 ]console; // [ 3, 2, 4, 1, 7, 5, 9 ]console; // [ 1, 2, 3, 4, 5, 7, 9 ]console; //falseconsole; //trueconsole; // trueconsole; // falseconsole; // falseconsole;// trueconsole;// utilitypro1518028437757@npm.comconsole;// efedbconsole;// 8995359431console;// www.sdasd.comconsole;// 192.168.1.50
more functions will be added in future.. stay tuned.. :)