js_common_tools.js
v0.0.5
Published
一个简单的js工具库,包含:二维码绘制、海报绘制、加减乘除 (解决精度问题)、随机字符串获取等常工具函数;兼容web和微信小程序
Downloads
19
Maintainers
Readme
介绍
一个简单的js工具库,包含:二维码绘制、海报绘制、加减乘除 (解决精度问题)、随机字符串获取等常用工具函数
兼容web和微信小程序
功能
海报绘制
二维码绘制
常用工具函数
源码目录
.
├── doc
├── example
├── src
└── README.md
doc
是库的参数说明example
是示例demosrc
是库源码
npm 安装使用
npm install js_common_tools.js
import {mxDiv, mxMul, mxSub, mxAdd } from "js_common_tools.js"
console.log("mxDiv: ", mxDiv(0.1, 0.2))
console.log("mxMul: ", mxMul(0.1, 0.2))
console.log("mxSub: ", mxSub(0.1, 0.2))
console.log("mxAdd: ", mxAdd(0.1, 0.2))
import * as common from "js_common_tools.js"
console.log("mxDiv: ", common.mxDiv(0.1, 0.2))
console.log("mxMul: ", common.mxMul(0.1, 0.2))
console.log("mxSub: ", common.mxSub(0.1, 0.2))
console.log("mxAdd: ", common.mxAdd(0.1, 0.2))