https://github.com/muyunyun/diana
fe customized tools:nut_and_bolt:
https://github.com/muyunyun/diana
diana javascript utilities
Last synced: 4 months ago
JSON representation
fe customized tools:nut_and_bolt:
- Host: GitHub
- URL: https://github.com/muyunyun/diana
- Owner: MuYunyun
- License: mit
- Created: 2017-11-15T08:47:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T06:01:10.000Z (over 3 years ago)
- Last Synced: 2025-03-10T23:12:06.101Z (over 1 year ago)
- Topics: diana, javascript, utilities
- Language: TypeScript
- Homepage: http://muyunyun.cn/diana/
- Size: 2.74 MB
- Stars: 71
- Watchers: 4
- Forks: 11
- Open Issues: 30
-
Metadata Files:
- Readme: README-zh-cn.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://badge.fury.io/js/diana) [](https://www.npmjs.com/package/diana)  [](https://codecov.io/gh/MuYunyun/diana) 
[English](./README.md) | 简体中文
Diana 是轻量实用的 JavaScript 工具库。
* 使用 `TypeScript`、`Rollup` 构建
* 支持 `Browser`、`Node` 两端
* 支持[按需加载](https://github.com/demos-platform/babel-plugin-on-demand-loading)
### Installp
```bash
npm install diana --save
```
### Usage
> [使用文档](http://muyunyun.cn/diana/) :tada:
```js
import _ from 'diana' // ES6
// const _ = require('diana') // common.js
const isEqual = _.equal([1, 2, 3], [1, 2, 3]) // true
```
> 配合使用 [babel-plugin-on-demand-loading](https://github.com/demos-platform/babel-plugin-on-demand-loading) 可以实现按需加载, 体积能极大的减小。
与此同时该库后续会集成一些有用的装饰器函数, 比如目前可以像如下使用防抖函数:
```js
import { Debounce } from 'diana'
class Demo {
@Debounce(1000)
submit() {} // 点击按钮
}
```
### Philosophy
* 抽离出系统间通用的方法;
* 定制化的瑞士军刀;
### Develop Process
* [更新日志](https://github.com/MuYunyun/diana/blob/master/CHANGELOG.md)
* [关于 Diana](https://github.com/MuYunyun/diana/issues/1)
* [按需加载实践](https://github.com/MuYunyun/diana/issues/5)
### Contribute
If you want to contrubute this proj, you can read [how to pr](https://github.com/MuYunyun/diana/blob/master/.github/PULL_REQUEST_TEMPLATE.md)