0.0.3 • Published 5 months ago

xe-utils-es v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

xe-utils-es(xe-utils的typescript版本)

Installing

npm install xe-utils-es

Using nodejs

import * as XEUtils from 'xe-utils-es'

Get on unpkg and cdnjs

<script src="https://cdn.jsdelivr.net/npm/xe-utils-es"></script>

Import all methods

import _XEUtils_ from 'xe-utils-es'

XEUtils.toDateString(Date.now())
// 2018-01-01 10:30:28
XEUtils.toStringDate('2018-01-01 10:30:00')
// Mon Jan 01 2018 10:30:00 GMT+0800 (中国标准时间)

Import on demand

这样按需引入方法,可以使体积达到最小
单个导入,包的大小 gzip >≈ 60B+,按需导入

import {each,toDateString} from 'xe-utils-es'

each({ a: 11, b: 22, c: 33 }, function (item, key){
  console.log(item)
})
// 11
// 22
// 33
toDateString(Date.now(), 'yyyy-MM-dd HH:mm:ss')
// 2018-01-01 10:30:28
0.0.3

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago