@kctools/bun-react 0.0.0-beta.0
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/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +14 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/package.json +73 -0
- package/src/index.test.ts +35 -0
- package/src/index.ts +10 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Multiplies two numbers and returns the result.\n *\n * @param a - The first number\n * @param b - The second number\n * @returns The product of a and b\n */\nexport const multiply = (a: number, b: number): number => {\n\treturn a * b;\n};\n"],"mappings":";mEAOA,MAAa,GAAY,EAAW,IAC5B,EAAI"}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @generated by tsdown, DO NOT edit it manually
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Multiplies two numbers and returns the result.
|
|
5
|
+
*
|
|
6
|
+
* @param a - The first number
|
|
7
|
+
* @param b - The second number
|
|
8
|
+
* @returns The product of a and b
|
|
9
|
+
*/
|
|
10
|
+
declare const multiply: (a: number, b: number) => number;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { multiply };
|
|
13
|
+
// Generated by @kcconfigs/tsdown
|
|
14
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;;AAOA;;;;;;cAAa,QAAA,GAAY,CAAA,UAAW,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @generated by tsdown, DO NOT edit it manually
|
|
2
|
+
//#region src/index.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Multiplies two numbers and returns the result.
|
|
5
|
+
*
|
|
6
|
+
* @param a - The first number
|
|
7
|
+
* @param b - The second number
|
|
8
|
+
* @returns The product of a and b
|
|
9
|
+
*/
|
|
10
|
+
declare const multiply: (a: number, b: number) => number;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { multiply };
|
|
13
|
+
// Generated by @kcconfigs/tsdown
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"mappings":";;;AAOA;;;;;;cAAa,QAAA,GAAY,CAAA,UAAW,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * Multiplies two numbers and returns the result.\n *\n * @param a - The first number\n * @param b - The second number\n * @returns The product of a and b\n */\nexport const multiply = (a: number, b: number): number => {\n\treturn a * b;\n};\n"],"mappings":";AAOA,MAAa,GAAY,EAAW,IAC5B,EAAI"}
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kctools/bun-react",
|
|
3
|
+
"version": "0.0.0-beta.0",
|
|
4
|
+
"description": "Use bun to start dev or prod server for react website",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"devDependencies": {
|
|
7
|
+
"@biomejs/biome": "2.4.6",
|
|
8
|
+
"tsdown": "0.20.3",
|
|
9
|
+
"vitest": "4.0.15",
|
|
10
|
+
"@kcconfigs/vitest": "0.1.2-beta.2",
|
|
11
|
+
"@kcconfigs/biome": "1.0.0-beta.1",
|
|
12
|
+
"@kcconfigs/tsconfig": "1.0.0-beta.1",
|
|
13
|
+
"@kcconfigs/tsdown": "0.1.2-beta.3"
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.cts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"source": "./src/index.ts",
|
|
20
|
+
"typedoc": "./src/index.ts",
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/index.d.cts",
|
|
23
|
+
"default": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"default": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"license": "AGPL-3.0-only",
|
|
32
|
+
"homepage": "https://github.com/kc-workspace/kcws/tree/main/packages/@kctools/bun-react",
|
|
33
|
+
"repository": {
|
|
34
|
+
"type": "git",
|
|
35
|
+
"directory": "@kctools/bun-react",
|
|
36
|
+
"url": "git+https://github.com/kc-workspace/kcws.git"
|
|
37
|
+
},
|
|
38
|
+
"author": {
|
|
39
|
+
"name": "Kamontat Chantrachirathumrong",
|
|
40
|
+
"email": "kcws@kc.in.th",
|
|
41
|
+
"url": "https://github.com/kamontat"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"react",
|
|
45
|
+
"website",
|
|
46
|
+
"bun",
|
|
47
|
+
"bunjs",
|
|
48
|
+
"server"
|
|
49
|
+
],
|
|
50
|
+
"files": [
|
|
51
|
+
"CHANGELOG.json",
|
|
52
|
+
"CHANGELOG.md",
|
|
53
|
+
"dist",
|
|
54
|
+
"src"
|
|
55
|
+
],
|
|
56
|
+
"engines": {
|
|
57
|
+
"node": ">=14"
|
|
58
|
+
},
|
|
59
|
+
"publishConfig": {
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"scripts": {
|
|
63
|
+
"build": "tsdown",
|
|
64
|
+
"test": "vitest run",
|
|
65
|
+
"fix": "biome check --fix --unsafe",
|
|
66
|
+
"check": "pnpm run lint:check && pnpm run format:check && pnpm run type:check",
|
|
67
|
+
"format": "biome format --fix",
|
|
68
|
+
"format:check": "biome format",
|
|
69
|
+
"lint": "biome lint --fix --unsafe",
|
|
70
|
+
"lint:check": "biome lint",
|
|
71
|
+
"type:check": "tsc --noEmit"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { describe, expect, test } from "vitest";
|
|
2
|
+
import { multiply } from ".";
|
|
3
|
+
|
|
4
|
+
describe(multiply.name, () => {
|
|
5
|
+
test("should multiply two numbers correctly", () => {
|
|
6
|
+
expect(multiply(3, 4)).toBe(12);
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
test("should handle negative numbers", () => {
|
|
10
|
+
expect(multiply(-2, 5)).toBe(-10);
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
test("should handle zero", () => {
|
|
14
|
+
expect(multiply(0, 5)).toBe(0);
|
|
15
|
+
expect(multiply(10, 0)).toBe(0);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("should handle decimal numbers", () => {
|
|
19
|
+
expect(multiply(2.5, 4)).toBe(10);
|
|
20
|
+
expect(multiply(1.5, 2.5)).toBe(3.75);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test("should handle both negative numbers", () => {
|
|
24
|
+
expect(multiply(-3, -4)).toBe(12);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test("should handle multiplication by one", () => {
|
|
28
|
+
expect(multiply(7, 1)).toBe(7);
|
|
29
|
+
expect(multiply(1, 7)).toBe(7);
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
test("should handle large numbers", () => {
|
|
33
|
+
expect(multiply(1000, 1000)).toBe(1000000);
|
|
34
|
+
});
|
|
35
|
+
});
|
package/src/index.ts
ADDED