fe-utils v1.0.2
collect all kinds of utility functions that are often used by us.
Installation
In a browser:
<script src="fe-utils.js"></script>
Using npm:
$ npm i -g npm
$ npm i --save fe-utils
Usage:
var feUtils = require('fe-utils')
var cookie = require('fe-utils/cookie')
allMethods:
- ** NumberToChinese **
- NumberToChinese(12345) // '一万二千三百四十五'
- NumberToChinese(12345, true) // '壹万贰仟叁佰肆十伍'
- ** cookie **
- setCookie(name, domain, domain, expiredays)
- getCookie(name)
- delCookie(name, domain)
- ** date **
- dateFormat() // dateFormat(new Date(), 'MM月dd日 hh:mm:ss')
- ** detectedInfos **
- isAndroid / isIOS / isWindowPhone / isWX / isWeibo / isMobile / isPC
- ** preventViewScroll **
- ** urlQuery **
- ** toRoman **
toRoman(25) // 'XXV'
- ** getVersionOfIOS **