", js-common-functions Home

Home

js-common-functions

GitHub stars GitHub license Rate on Openbase jsdelivr NPM

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