@dandelion-promise/utils 1.0.0 → 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.
- package/package.json +7 -1
- package/__test__/math.test.ts +0 -15
- package/__test__/string.test.ts +0 -13
- package/src/index.ts +0 -2
- package/src/math.ts +0 -11
- package/src/string.ts +0 -7
- package/tsconfig.json +0 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dandelion-promise/utils",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"iife"
|
|
18
18
|
]
|
|
19
19
|
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist"
|
|
22
|
+
],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
20
26
|
"scripts": {
|
|
21
27
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
22
28
|
}
|
package/__test__/math.test.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as math from "../src/math";
|
|
2
|
-
|
|
3
|
-
describe("math utils", () => {
|
|
4
|
-
it("add:1 + 2 = 3", () => {
|
|
5
|
-
expect(math.sum(1, 2)).toBe(3);
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
it("subtract: 5 - 2 = 3", () => {
|
|
9
|
-
expect(math.subtract(5, 2)).toBe(3);
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
it("multiply: 2 * 3 = 6", () => {
|
|
13
|
-
expect(math.multiply(2, 3)).toBe(6);
|
|
14
|
-
});
|
|
15
|
-
});
|
package/__test__/string.test.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as string from "../src/string";
|
|
2
|
-
|
|
3
|
-
describe("string utils", () => {
|
|
4
|
-
it("capitalize:首字母大写", () => {
|
|
5
|
-
expect(string.capitalize("hello")).toBe("Hello");
|
|
6
|
-
expect(string.capitalize("test")).toBe("Test");
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
it("capitalize:去除首尾空格字符串", () => {
|
|
10
|
-
expect(string.trim(" hello ")).toBe("hello");
|
|
11
|
-
expect(string.trim(" test ")).toBe("test");
|
|
12
|
-
});
|
|
13
|
-
});
|
package/src/index.ts
DELETED
package/src/math.ts
DELETED
package/src/string.ts
DELETED