1.0.7 • Published 4 years ago
javascript-utility v1.0.7
javascript-utility
A set of common JavaScript utility helper functions.
Installation
$ yarn add javascript-utility
or
$ npm i --save javascript-utilityAPI
Utility functions
isNumericStringReturnstruewhen its input is a numeric string andfalseotherwise.isEmptyStringReturnstruewhen it's input is an empty string or contains only whitespace.notEmptyReturnstruewhen its input is notnull,undefinedor haslength0.notNumericStringReturnstruewhen its input is not a numeric string andfalseotherwise.isPositiveNumericStringReturnstruewhen its input is a positive numeric string and otherwise returnsfalse.isEmptyReturnstruewhen its input isnull,undefined, or haslength0.
Utility creators
lengthMoreThanGiven a number, returns a function that returns true when that input has length more than that number and false otherwise.lengthLessThanGiven a number, returns a function that returns true when that input has length less than that number and false otherwise.
Helpers
notGiven a function that returns a boolean, returns a function that returns a boolean in the opposite cases.