zxy-math 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.js +12 -0
  2. package/package.json +12 -0
  3. package/test.js +3 -0
package/index.js ADDED
@@ -0,0 +1,12 @@
1
+ function zxy_sum(a, b) {
2
+ return a + b
3
+ }
4
+
5
+ function zxy_sub(a, b) {
6
+ return a - b
7
+ }
8
+ // 暴露数据 写成对象的样式 因为不一定只有一个模块
9
+ module.exports = {
10
+ zxy_sum,
11
+ zxy_sub
12
+ }
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "zxy-math",
3
+ "version": "1.0.1",
4
+ "description": "",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ }
12
+ }
package/test.js ADDED
@@ -0,0 +1,3 @@
1
+ const zxy = require('./index')
2
+ console.log(zxy.zxy_sum(3, 2));
3
+ console.log(zxy.zxy_sub(3, 2));