1.0.1 • Published 5 months ago

@einere/common-utils v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Common Utils

This is collection of my common utility functions.

Methods

methoddescription
noopdo nothing
negatenegate boolean
identityreturn parameter
isExistcheck parameter is not undefined or null
isTruthycheck parameter is truthy
isFalsycheck parameter is falsy
isEmptyStrcheck parameter is empty string
isNotEmptyStrcheck parameter is not empty string
isEmptyArraycheck parameter is empty array
isNotEmptyArraycheck parameter is not empty array
isEmptyObjcheck parameter is empty object
isNotEmptyObjcheck parameter is not empty object
isFunctioncheck parameter is function
isNumbercheck parameter is valid number
getValueget value from parameter with default value
converterconvert function to apply Array.sort
infinityget infinite iterator
limitget finite iterator from another iterator
nthget nth item in array
firstget first item in array
dropremove n items from head in array
catconcat arrays
constructconstruct array with head item
mapCatconcat arrays with map function
dropRightremove n items from tail in array
interposeinsert returned value at each item in array
pickget object only include specific keys
1.0.1

5 months ago

1.0.0

5 months ago