Skip to content

CatchZeng/cat-jsutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

NPM version travis ci Coverage Status

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.

array


indexOf(arr, val)

Get value's index in array.

Coverage

Run script to see coverage.

npm run coverage

Open coverage/lcov-report/index.html with browser to see coverage detial.

About

A collection of JavaScript utility functions without any dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published