A library to provide commonly required javascript functions.
npm install @iarkaroy/utils
import * as utils from '@iarkaroy/utils';
Checks whether the passed argument is an array.
utils.is.arr(any);
Checks whether the passed argument is an object.
utils.is.obj(any);
Checks whether the passed argument is a string.
utils.is.str(any);
Checks whether the passed argument is a function.
utils.is.fnc(any);
Checks whether the passed argument is a number.
utils.is.num(any);
Checks whether the passed argument is undefined.
utils.is.und(any);
Checks whether the passed argument is null.
utils.is.nul(any);
Generates an array with numbers.
utils.range(100, 1, 2);
Returns max number from an array.
utils.max(arrayOfNumbers);
Returns min number from an array.
utils.min(arrayOfNumbers);
Generates random number in specified range.
utils.rand(100, 50);
npm test
Arka Roy
Copyright © 2018 Arka Roy
Released under the MIT license.