javascript-utility
v1.0.7
Published
utils function for js
Downloads
6
Maintainers
Readme
javascript-utility
A set of common JavaScript utility helper functions.
Installation
$ yarn add javascript-utility
or
$ npm i --save javascript-utility
API
Utility functions
isNumericString
Returnstrue
when its input is a numeric string andfalse
otherwise.isEmptyString
Returnstrue
when it's input is an empty string or contains only whitespace.notEmpty
Returnstrue
when its input is notnull
,undefined
or haslength
0.notNumericString
Returnstrue
when its input is not a numeric string andfalse
otherwise.isPositiveNumericString
Returnstrue
when its input is a positive numeric string and otherwise returnsfalse
.isEmpty
Returnstrue
when its input isnull
,undefined
, or haslength
0.
Utility creators
lengthMoreThan
Given a number, returns a function that returns true when that input has length more than that number and false otherwise.lengthLessThan
Given a number, returns a function that returns true when that input has length less than that number and false otherwise.
Helpers
not
Given a function that returns a boolean, returns a function that returns a boolean in the opposite cases.