title | tags | author | update | |||||
---|---|---|---|---|---|---|---|---|
keepsmiling |
|
2020-03-08 |
生成自己的 js 工具包,包括打包 webpack、测试 mocha、生成文档 jsdoc、发布 npm 包的操作。
Install with npm:
npm install --save keepsmiling
Install with yarn:
yarn add keepsmiling
In Node:
// keepsmiling the full build.
const keepsmiling = require("keepsmiling");
import keepsmiling from "keepsmiling"; // ES6
const keepsmiling = require("keepsmiling"); // CommonJS
在页面内直接引用:
<script src="./keepsmiling.min.js"></script>
已全局注入keepsmiling
与ks
,可直接使用。
- version
- description
- doc
- debounce
- objectCopyData
- deepClone
- once
- throttle
- arrayMax
- arrayMin
- arrayAverage
- arrayFibonacci
- extendObj
- digitUppercase
- formatPassTime
- formatRemainTime
- thousandsSeparator
- trim
- isUndefined
- isNull
- isNumber
- isBoolean
- isFunction
- isRegExp
- isDate
- isString
- isObject
- isArray
- getQueryString
- getExplore
- getOS
- getScrollPos
- timeTaken
- getRate
- turnToStackoverflow
- parseUrl
- getPrime
- isBrowserEnv
- isEmptyObject
- isEmail
- isIdCard
- isPhoneNum
- isUrl
- isPrime
- isPalindrome
- getKeyName
- randomColor
- randomNum
- setLocalStorage
- getLocalStorage
- removeLocalStorage
- setCookie
- getCookie
- removeCookie
- stringCapitalizeEveryWord