1.9.1 • Published 8 months ago
@hyhello/utils v1.9.1
@hyhello/utils
介绍
前端业务常用工具函数库。查看在线文档
安装教程
npm install @hyhello/utils
Note: add --save if you are using npm < 5.0.0
使用说明
Use in a browser(CDN):
<!-- 引入库 -->
<script src="https://cdn.jsdelivr.net/npm/@hyhello/utils/lib/index.min.js"></script>
or
<script src="https://unpkg.com/@hyhello/utils/lib/index.min.js"></script>
Use In Node.js:
// Load the full build.
var utils = require('@hyhello/utils');
// Load method categories.
var isArray = require('@hyhello/utils/lib/isArray');
or
var { isArray } = require('@hyhello/utils');
Use In ES6:
// Load the full build.
import utils from '@hyhello/utils';
// Load method categories.
import isArray from '@hyhello/utils/lib/isArray';
or
import { isArray } from '@hyhello/utils';
按需引入
Usage
npm install babel-plugin-import --save-dev
Via .babelrc or babel-loader.
{
"plugins": [["import", options]]
}
options
options can be object.
{
"libraryName": "@hyhello/utils",
"libraryDirectory": "lib",
"camel2DashComponentName": false, // default: true
}
For example, the default behavior
import { isArray } from '@hyhello/utils';
↓ ↓ ↓ ↓ ↓ ↓
var isArray = require('@hyhello/utils/lib/isArray');
支持情况
Tested in Chrome 74-75, Firefox 66-67, IE 9, Edge 18, Safari 11-12, & Node.js 8-12.
注:采用 jest + jsdom 进行单元测试,报告如下:
- Statements:98.96%
- Branches:97.22%
- Functions: 99.28%
- Lines: 99.02%
1.9.1
8 months ago
1.9.0
12 months ago
1.8.1
1 year ago
1.8.0
1 year ago
1.7.0
1 year ago
1.6.0
2 years ago
1.5.0
2 years ago
1.4.0
2 years ago
1.3.3
2 years ago
1.3.2
2 years ago
1.2.8
2 years ago
1.3.1
2 years ago
1.3.0
2 years ago
1.2.7
2 years ago
1.2.6
2 years ago
1.2.5
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.0
2 years ago
1.0.7
2 years ago
1.0.6
2 years ago
1.0.5
2 years ago
1.0.4
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago