@fsyyft/npmjs-add 0.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/README.md +0 -0
- package/dist/cli.cjs +22 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +21 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +33 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/package.json +52 -0
package/README.md
ADDED
|
File without changes
|
package/dist/cli.cjs
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
// src/index.ts
|
|
5
|
+
function add(a2, b2) {
|
|
6
|
+
return a2 + b2;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// src/cli.ts
|
|
10
|
+
var args = process.argv.slice(2);
|
|
11
|
+
if (args.length < 2) {
|
|
12
|
+
console.error("Usage: npmjs-add <number1> <number2>");
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
var a = Number(args[0]);
|
|
16
|
+
var b = Number(args[1]);
|
|
17
|
+
if (isNaN(a) || isNaN(b)) {
|
|
18
|
+
console.error("Error: Both arguments must be valid numbers");
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
console.log(add(a, b));
|
|
22
|
+
//# sourceMappingURL=cli.cjs.map
|
package/dist/cli.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/cli.ts"],"sourcesContent":["/**\n * Adds two numbers together.\n * @param a - The first number\n * @param b - The second number\n * @returns The sum of a and b\n */\nexport function add(a: number, b: number): number {\n return a + b;\n}\n","#!/usr/bin/env node\n/**\n * CLI entry point for npmjs-add\n */\nimport { add } from \"./index\";\n\nconst args = process.argv.slice(2);\n\nif (args.length < 2) {\n console.error(\"Usage: npmjs-add <number1> <number2>\");\n process.exit(1);\n}\n\nconst a = Number(args[0]);\nconst b = Number(args[1]);\n\nif (isNaN(a) || isNaN(b)) {\n console.error(\"Error: Both arguments must be valid numbers\");\n process.exit(1);\n}\n\nconsole.log(add(a, b));\n"],"mappings":";;;;AAMO,SAAS,IAAIA,IAAWC,IAAmB;AAChD,SAAOD,KAAIC;AACb;;;ACFA,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,IAAI,KAAK,SAAS,GAAG;AACnB,UAAQ,MAAM,sCAAsC;AACpD,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AACxB,IAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AAExB,IAAI,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG;AACxB,UAAQ,MAAM,6CAA6C;AAC3D,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC;","names":["a","b"]}
|
package/dist/cli.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
function add(a2, b2) {
|
|
5
|
+
return a2 + b2;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// src/cli.ts
|
|
9
|
+
var args = process.argv.slice(2);
|
|
10
|
+
if (args.length < 2) {
|
|
11
|
+
console.error("Usage: npmjs-add <number1> <number2>");
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
var a = Number(args[0]);
|
|
15
|
+
var b = Number(args[1]);
|
|
16
|
+
if (isNaN(a) || isNaN(b)) {
|
|
17
|
+
console.error("Error: Both arguments must be valid numbers");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.log(add(a, b));
|
|
21
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/cli.ts"],"sourcesContent":["/**\n * Adds two numbers together.\n * @param a - The first number\n * @param b - The second number\n * @returns The sum of a and b\n */\nexport function add(a: number, b: number): number {\n return a + b;\n}\n","#!/usr/bin/env node\n/**\n * CLI entry point for npmjs-add\n */\nimport { add } from \"./index\";\n\nconst args = process.argv.slice(2);\n\nif (args.length < 2) {\n console.error(\"Usage: npmjs-add <number1> <number2>\");\n process.exit(1);\n}\n\nconst a = Number(args[0]);\nconst b = Number(args[1]);\n\nif (isNaN(a) || isNaN(b)) {\n console.error(\"Error: Both arguments must be valid numbers\");\n process.exit(1);\n}\n\nconsole.log(add(a, b));\n"],"mappings":";;;AAMO,SAAS,IAAIA,IAAWC,IAAmB;AAChD,SAAOD,KAAIC;AACb;;;ACFA,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AAEjC,IAAI,KAAK,SAAS,GAAG;AACnB,UAAQ,MAAM,sCAAsC;AACpD,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AACxB,IAAM,IAAI,OAAO,KAAK,CAAC,CAAC;AAExB,IAAI,MAAM,CAAC,KAAK,MAAM,CAAC,GAAG;AACxB,UAAQ,MAAM,6CAA6C;AAC3D,UAAQ,KAAK,CAAC;AAChB;AAEA,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC;","names":["a","b"]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
add: () => add
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(index_exports);
|
|
26
|
+
function add(a, b) {
|
|
27
|
+
return a + b;
|
|
28
|
+
}
|
|
29
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
30
|
+
0 && (module.exports = {
|
|
31
|
+
add
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Adds two numbers together.\n * @param a - The first number\n * @param b - The second number\n * @returns The sum of a and b\n */\nexport function add(a: number, b: number): number {\n return a + b;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAMO,SAAS,IAAI,GAAW,GAAmB;AAChD,SAAO,IAAI;AACb;","names":[]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Adds two numbers together.\n * @param a - The first number\n * @param b - The second number\n * @returns The sum of a and b\n */\nexport function add(a: number, b: number): number {\n return a + b;\n}\n"],"mappings":";AAMO,SAAS,IAAI,GAAW,GAAmB;AAChD,SAAO,IAAI;AACb;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fsyyft/npmjs-add",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "A simple addition utility library",
|
|
5
|
+
"main": "./dist/index.cjs",
|
|
6
|
+
"module": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"dev": "tsx src/index.ts",
|
|
17
|
+
"build": "tsup",
|
|
18
|
+
"prepublishOnly": "npm run build && npm run test:run",
|
|
19
|
+
"lint": "eslint src",
|
|
20
|
+
"lint:fix": "eslint src --fix",
|
|
21
|
+
"test": "vitest",
|
|
22
|
+
"test:run": "vitest run"
|
|
23
|
+
},
|
|
24
|
+
"repository": {
|
|
25
|
+
"type": "git",
|
|
26
|
+
"url": "git+https://github.com/fsyyft-ts/npmjs-add.git"
|
|
27
|
+
},
|
|
28
|
+
"keywords": [],
|
|
29
|
+
"author": "",
|
|
30
|
+
"license": "ISC",
|
|
31
|
+
"bin": {
|
|
32
|
+
"npmjs-add": "./dist/cli.js"
|
|
33
|
+
},
|
|
34
|
+
"type": "module",
|
|
35
|
+
"files": [
|
|
36
|
+
"dist"
|
|
37
|
+
],
|
|
38
|
+
"bugs": {
|
|
39
|
+
"url": "https://github.com/fsyyft-ts/npmjs-add/issues"
|
|
40
|
+
},
|
|
41
|
+
"homepage": "https://github.com/fsyyft-ts/npmjs-add#readme",
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@eslint/js": "^10.0.1",
|
|
44
|
+
"@types/node": "^25.3.0",
|
|
45
|
+
"eslint": "^10.0.1",
|
|
46
|
+
"tsup": "^8.5.1",
|
|
47
|
+
"tsx": "^4.21.0",
|
|
48
|
+
"typescript": "^5.9.3",
|
|
49
|
+
"typescript-eslint": "^8.56.0",
|
|
50
|
+
"vitest": "^4.0.18"
|
|
51
|
+
}
|
|
52
|
+
}
|