js-common-functions
Installation
npm install js-common-functions --save
DEMO
import {deepClone} from "js-common-functions";
console.log(deepClone({a: 1, b: {c: 2}})); // {a: 1, b: {c: 2}}
Some functions
- deepClone
- shallowClone
- getObjectLength
- timeFormat
- ajax
- isContain
- unique
- randomColor
- sortBy
- randomCode
- checkPassword
- checkEmail
- checkPhone
- checkIdCard
- checkBankCard
- checkPhoneSystem
- getPhoneAttribution
- fetch
- isPC
- trim
- filterHTML
- isFloat
- isInteger
- stringifyQueryString
- getScrollTop
- windowResize
If in doubt, please submitissues :)
More detailed documentation is here