Package Exports
- comutils
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (comutils) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
comutils
前端代码常用工具类
目的:集成前端常用util方法代码
安装使用
- 直接下载
bulid目录下的comutils.min.js使用,支持UMD通用模块规范 - 使用npm安装
浏览器:
<script src="comutils.min.js"></script>
<script>
var hasClass = comutils.hasClass(el,cls)
</script>npm:
$ npm install --save-dev comutils// 完整引入
const comutils = require('comutils')
const typeOf = comutils.typeOf([])推荐使用方法
不需要完整引入所有函数,只引入需要使用的方法即可
// 只引入部分方法('comutils/<方法名>')
const typeOf = require('comutils/typeOf')
const typeOf = typeOf()
// import {}
import {typeOf} from 'comutils'