中文 Online Use | | Update Log | Feedback bug | Gitee
- byte
- constant
- cookie
- datetime
- dom
- extend
- gbk
- is
- lib
- math
- polyfill
- storage
- tool
- event
- md5
npm i tc-util
Full reference
import tcUtil from 'tc-util';
On-demand introduction
import tcMath from 'tc-util/math';
import {formatDate} from'tc-util/datetime';
Full reference
<script src="https://cdn.jsdelivr.net/npm/tc-util/tc-util.min.js"></script>
<script>
console.log(tcUtil);
</script>
On-demand introduction
<script src="https://cdn.jsdelivr.net/npm/tc-util/math.js"></script>
<script>
console.log(tcMath);
</script>
- stringToBytes
- stringToGbkBytes
- bytesToString
- bytesToNumber
- TYPE
- UINT_TYPE
- VERSION
- COMPARE_RESULT
- getCookie
- setCookie
- removeCookie
- getDaysInMonth
- getFirstDayWeekInMonth
- formatTime
- formatDate
- timeToJson
- dateToJson
- timeToDate
- dateToTime
- nowTime
- nowDate
- msToSecond
- secondToMs
- minuteToMs
- hourToMs
- $: Please refer to easy-dom-util
- registDisableContextMenu
- disableDefaultEvent
- onPageShowHide
- String
- Array
- Number
- Function
- Object
- Json
- encodeGBK
- decodeGBK
- isUndf
- isFunc
- isObject
- isJson
- isJsonOrArray
- isNumber
- isNull
- isBool
- isString
- isType
- isArray
- isPC
- isMobile
- isIOS
- isAndroid
- isWX
- isQQ
- isTenVideo
- isWxMiniProgram
- isIOSWx
- isIPAddress
- isInited
- creatEventReady
- createDotAnimation
- createState
- createStatus
- countDistance
- countDistanceByDiff
- countSumOfSquare
- countValueByRateAndRange
- circleToRect
- isPointInRect
- isPointInCircle
- countPosDiffByStep
- keys
- values
- assign
- getStorage
- setStorage
- removeStorage
tcUtil._
- getUrlParam
- parseUrlParam
- copy
- type
- random
- download
- execute
- importScript
- readFile
- mapArray
- mapJson
- parseJSON
- pick
- pickAttr
- pickTo
- removeRedundantAttrInObject
- getUUID
- boolPipe
- throttle
- countImgSize
- compareVersion
- versionToArray
Please refer to tc-event
- md5