cat-jsutils
v1.0.5
Published
js utils
Downloads
5
Maintainers
Readme
A collection of JavaScript utility functions without any dependencies.
Installation
$ npm i --save cat-jsutils
Usgae
var utils = require('cat-jsutils')
utils.string.isString('aaa')//true
//Or
var util = require('cat-jsutils').string
util.isString('aaa')//true
API
string
isString(value)
Determine whether value is a string.
contains(source, value)
Determine whether source contains value.
containsAny(source, ...value)
Determine whether source contains any of the value.
containsAll(source, ...value)
Determine whether source contains all values.
changeCase(source, caseType)
Change source case with CaseType
genUUID(len, radix)
Generate UUID with length and radix.
number
isNum(value)
Determine whether value is a Number.
Coverage
Run script to see coverage.
npm run coverage
Open coverage/lcov-report/index.html with browser to see coverage detial.