1 | <div align="center">
|
2 | <img src="http://oqhtscus0.bkt.clouddn.com/dcce7b9509a0e23f91d8cd2aa3ecffd3.jpg-200">
|
3 | </div>
|
4 |
|
5 | [![npm version](https://badge.fury.io/js/diana.svg)](https://badge.fury.io/js/diana) [![week download](https://img.shields.io/npm/dw/diana.svg)](https://www.npmjs.com/package/diana) ![Build Status](https://travis-ci.org/MuYunyun/diana.svg?branch=master) [![codecov](https://codecov.io/gh/MuYunyun/diana/branch/master/graph/badge.svg)](https://codecov.io/gh/MuYunyun/diana) ![LICENSE MIT](https://img.shields.io/npm/l/express.svg)
|
6 |
|
7 | 前端定制化工具库
|
8 |
|
9 | * 支持 browser 和 node 环境
|
10 |
|
11 | ### Install
|
12 |
|
13 | ```bash
|
14 | yarn add diana || npm install diana --save
|
15 | ```
|
16 |
|
17 | ### Usage
|
18 |
|
19 | > [使用文档](http://muyunyun.cn/diana/) :tada:
|
20 |
|
21 | ```js
|
22 | import * as _ from 'diana' // browser
|
23 | // const _ = require('diana') // node.js
|
24 | const isEqual = _.equal([1, 2, 3], [1, 2, 3]) // true
|
25 | ```
|
26 |
|
27 | 同时也加了一些有用的装饰器函数,例如可以像如下使用防抖函数:
|
28 |
|
29 | ```js
|
30 | import { Debounce } from 'diana'
|
31 | class Demo {
|
32 | @Debounce(1000)
|
33 | submit() {
|
34 | // call api
|
35 | }
|
36 | }
|
37 | ```
|
38 |
|
39 | ### Contribute
|
40 |
|
41 | Before submitting a pull request, please make sure read [how to pr](https://github.com/MuYunyun/diana/blob/master/.github/PULL_REQUEST_TEMPLATE.md)
|
42 |
|
43 | ### Todo
|
44 |
|
45 | - [ ] 将 diana 的函数进行拆分打包
|
46 | - [ ] 实现相应的按需加载 babel 插件 |
\ | No newline at end of file |