@cycjimmy/awesome-js-funcs
v4.0.9
Published
Personal collection of javascript functions often used.
Downloads
148,654
Readme
Awesome Js Funcs
Install
# via npm
$ npm install @cycjimmy/awesome-js-funcs --save
# or via yarn
$ yarn add @cycjimmy/awesome-js-funcs
Usage. E.g:
import { isString } from '@cycjimmy/awesome-js-funcs';
// or better import
import { isString } from '@cycjimmy/awesome-js-funcs/esm/judgeBasic';
// or best import (recommend)
import isString from '@cycjimmy/awesome-js-funcs/esm/judgeBasic/isString';
const isString = require('@cycjimmy/awesome-js-funcs/cjs/judgeBasic/isString.cjs').default;
console.log(isString('string')); // show true
Function Collection
- judgeBasic
isString
isNumber
isObject
isFunction
isArray
isNull
isUndefined
isPromise
isNodeList
isUrl
- judge
isChineseName
isChinesePhoneNumber
isChineseIdentificationNum
- string
trim
firstUpperCase
midlineToCamel
- array
shuffle
- object
entries
clean
- math
randomInt
- typeConversion
nodeListToArray
functionToPromise
stringTrueFalseToBoolean
stringToJson
- dom
QueryAll
(constructor)siblingFilter
addStyles
getElementStyle
addPreloadLink
touchActive
touchActiveMockClick
- event
dispatch
debounce
throttle
preventDefault
- media
isAudioPlaying
isVideoPlaying
- handheld
judgeOrientation
isMobile
getBrowserInfo
- function
delayForPromise
- regExpression
chineseName
chinesePhoneNumber
chineseIdentificationNum
- designPattern
CreateInstance
(constructor)
- seldom
getUrlRelativeDir