English | 简体中文
Front-end business code tool library
Provide the commonly used tool functions in the project, such as timestamp, conversion of format, data type judgment, throttling function, etc. Like the name screw, be a screw in the project development process.
Purpose: complete front-end business code efficiently
To avoid the trouble of copying and pasting many times for different projects, the common functions in the business development process are encapsulated here and released to npm to improve development efficiency.
npm i common-screwyarn add common-screwDefault support for ES Modules-based Tree Shaking
import { randomBoolean, isArray, addDaysToDate } from "common-screw"
randomBoolean() // false
isArray(3) // false
isArray([1, 2]) // true
addDaysToDate("2020-10-15", -10) // 2020-10-05import {
CSBrowser,
CSDate,
CSDown,
CSFormat,
CSFunction,
CSLang,
CSRandom,
CSRegexp
} from "common-screw"
CSDate.addDaysToDate("2021-10-15", -10) // 2021-10-05
CSRandom.randomBoolean() // false