1.1.20 • Published 5 years ago

base-math-demo1 v1.1.20

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

base-math

npm.io npm.io npm.io npm.io npm.io

简单的数学方法库,旨在方便计算(这个一个创建标准JavaScript库的demo,如何创建?

关于npm package.json字段的介绍,请移步这里

兼容性

支持如下环境:

IEEGCHFFSFOPIOS安卓Node
no12+19+16+9+15+9+4.1+6.14+

目录介绍

.
├── config 配置
├── demo 使用demo
├── dist 编译产出代码
├── doc 项目文档
├── src 源代码目录
├── test 单元测试
├── CHANGELOG.md 变更日志
└── TODO.md 计划功能

如何使用

通过npm下载安装代码

$ npm install --save base-math

如果你是node环境

var baseMath = require('base-math');

baseMath.plus([1,2,3]) // 6
baseMath.plus([undefined, null, 1]) // 1

如果你是webpack等环境

import { plus } from 'base-math';

plus([1,2,3]) // 6
plus([undefined, null, 1]) // 1

如果你是requirejs环境

requirejs(['node_modules/base-math/dist/index.aio.js'], function (baseMath) {
    baseMath.plus([1,2,3]) // 6
    baseMath.plus([undefined, null, 1]) // 1
})

如果你是浏览器环境

<script src="node_modules/base-math/dist/index.aio.js"></script>

<script>
    baseMath.plus([1,2,3]) // 6
    baseMath.plus([undefined, null, 1]) // 1
</script>

文档

更新日志

计划列表

贡献者指南

首先安装依赖

$ npm install

打包代码

$ npm run build

运行单元测试,浏览器端需要手动测试,html位于test/browser

$ npm test

修改package.json中的版本号,修改README.md,修改CHANGELOG.md,然后发布新版

$ npm run release

版本号规范

主版本号:当你做了不兼容的 API 修改,
次版本号:当你做了向下兼容的功能性新增,
修订号:当你做了向下兼容的问题修正。

License

MIT

keywords

  • math
  • 数学
1.1.20

5 years ago

1.1.19

5 years ago

1.1.18

5 years ago

1.1.17

5 years ago

1.1.16

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.0.2

5 years ago