goodchuck-utils 1.0.1 → 1.1.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.d.ts +5 -0
- package/dist/index.js +18 -0
- package/package.json +20 -4
- package/src/index.ts +17 -0
- package/tsconfig.json +14 -0
- package/index.js +0 -17
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
declare function add(a: number, b: number): number;
|
|
2
|
+
declare function subtract(a: number, b: number): number;
|
|
3
|
+
declare function multiply(a: number, b: number): number;
|
|
4
|
+
declare function divide(a: number, b: number): number;
|
|
5
|
+
export { add, subtract, multiply, divide };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.add = add;
|
|
4
|
+
exports.subtract = subtract;
|
|
5
|
+
exports.multiply = multiply;
|
|
6
|
+
exports.divide = divide;
|
|
7
|
+
function add(a, b) {
|
|
8
|
+
return a + b;
|
|
9
|
+
}
|
|
10
|
+
function subtract(a, b) {
|
|
11
|
+
return a - b;
|
|
12
|
+
}
|
|
13
|
+
function multiply(a, b) {
|
|
14
|
+
return a * b;
|
|
15
|
+
}
|
|
16
|
+
function divide(a, b) {
|
|
17
|
+
return a / b;
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "goodchuck-utils",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"main": "index.js",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"
|
|
7
|
+
"prepare": "npm run build:tsc",
|
|
8
|
+
"build": "npm run build",
|
|
9
|
+
"build:tsc": "tsc"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./src/index.js"
|
|
16
|
+
}
|
|
8
17
|
},
|
|
9
18
|
"keywords": [],
|
|
10
19
|
"author": "",
|
|
11
20
|
"license": "ISC",
|
|
12
|
-
"description": ""
|
|
21
|
+
"description": "",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@types/node": "^25.0.6",
|
|
24
|
+
"typescript": "^5.9.3"
|
|
25
|
+
},
|
|
26
|
+
"include": [
|
|
27
|
+
"src/**/*.ts"
|
|
28
|
+
]
|
|
13
29
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
function add(a: number, b: number) {
|
|
2
|
+
return a + b;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
function subtract(a: number, b: number) {
|
|
6
|
+
return a - b;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function multiply(a: number, b: number) {
|
|
10
|
+
return a * b;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function divide(a: number, b: number) {
|
|
14
|
+
return a / b;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { add, subtract, multiply, divide };
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es6" /* 최신 브라우저는 es6을 대부분 지원한다. */,
|
|
4
|
+
"module": "commonjs" /* 모듈 시스템을 지정한다. */,
|
|
5
|
+
"lib": [
|
|
6
|
+
"es5",
|
|
7
|
+
"es6",
|
|
8
|
+
"dom"
|
|
9
|
+
] /* 타입스크립트가 어떤 버전의 JS의 빌트인 api를 사용할건지에 대한 것을 명시해 준다. */,
|
|
10
|
+
"declaration": true /* 타입스크립트가 자동으로 타입정의 (d.ts) 파일을 생성해 준다. */,
|
|
11
|
+
"outDir": "dist" /* 컴파일된 결과물을 어디에 저장할지에 대한 것을 명시해 준다. */,
|
|
12
|
+
"strict": true /* 타입스크립트의 엄격한 모드를 활성화한다. */
|
|
13
|
+
}
|
|
14
|
+
}
|
package/index.js
DELETED