ang-tool
Version:
JavaScript常用方法的封装|Encapsulation of common JavaScript methods
37 lines (31 loc) • 564 B
Markdown
## 安装
```
npm install ang-tool
```
## 导入
```js
import tool from 'ang-tool'
import {tool} from 'ang-tool'
```
## 金钱格式矫正
```js
// 传入number|string (参数见文档注释)
let v = '0210.0120'
console.log(tool.moneyInit(v))
// 返回 210.01
```
## 数组去重
```js
// 传入array (参数见文档注释)
let e = [1,2,2,3,3,3,4,4,4,4,5,5,5,5,5]
console.log(tool.arrayOnly(e))
// 返回 [1,2,3,4,5]
```
## 开源协议
ISC
## 注
```js
// author:huziya
// Email:297979580@qq.com
// time:202301270412
```