Package Exports
- @hai2007/tool
- @hai2007/tool/Hermite
- @hai2007/tool/Hermite.js
- @hai2007/tool/Matrix4
- @hai2007/tool/Matrix4.js
- @hai2007/tool/animation
- @hai2007/tool/animation.js
- @hai2007/tool/getKeyString.js
- @hai2007/tool/ruler
- @hai2007/tool/type
- @hai2007/tool/xhtml
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 (@hai2007/tool) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
💡 tool.js - 前端常用的工具类方法汇总
Issues
使用的时候遇到任何问题或有好的建议,请点击进入issue,欢迎参与维护!
How to use?
首先你需要通过命令行安装:
npm install --save @hai2007/tool安装好了以后,然后引入你需要的工具:
- 动画轮播
import animation from '@hai2007/tool/animation.js';- 列主序存储的4x4矩阵
import Matrix4 from '@hai2007/tool/Matrix4.js';- Hermite三次插值
import Hermite from '@hai2007/tool/Hermite.js';- 获取值的类型
import getType from '@hai2007/tool/getType.js';- 值类型判断方法
import {
isObject,
isUndefined, isNull, isBoolean, isNumber, isString, isSymbol,
isFunction, isArray, isError, isPlainObject,
isElement, isAttribute, isText, isComment
} from '@hai2007/tool/type.js';- 提供常用的DOM操作方法
import xhtml from '@hai2007/tool/xhtml.js';- 获取键盘此时按下的键的组合结果
import getKeyString from '@hai2007/tool/getKeyString.js';- 刻度尺刻度求解
import ruler from '@hai2007/tool/ruler.js';- 字符串操作
import {
ReadString
} from '@hai2007/tool/string.js';Special attention
如果你希望一下子引入全部方法,可以有如下方式引入:
import tool from '@hai2007/tool';或
<script src='https://cdn.jsdelivr.net/npm/@hai2007/tool@0'></script>如果是node.js环境,请使用这种方式引入:
const tool = require('@hai2007/tool');开源协议
Copyright (c) 2020-present hai2007 走一步,再走一步。