@wtasnorg/node-lib 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/.editorconfig ADDED
@@ -0,0 +1,23 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ indent_size = 4
7
+ indent_style = space
8
+ insert_final_newline = true
9
+ max_line_length = 120
10
+ trim_trailing_whitespace = true
11
+
12
+ [*.md]
13
+ trim_trailing_whitespace = false
14
+
15
+ [{*.json,*.yml}]
16
+ indent_style = space
17
+ indent_size = 2
18
+
19
+ [Makefile]
20
+ indent_style = tab
21
+
22
+ [*.go]
23
+ indent_style = tab
@@ -0,0 +1,16 @@
1
+ # Development Checklist
2
+
3
+ - [ ] Have you written tests for your code?
4
+ - [ ] Does the code pass all tests? `npm run test`
5
+ - [ ] Have you upated documentation?
6
+ - [ ] Have you generated docs via `npm run docs && npm run docs:json`
7
+ - [ ] Have you reviewed the code locally?
8
+ - [ ] Have you used the code locally?
9
+ - [ ] Check your email and username. Protect PII. `git log -n1`
10
+
11
+
12
+ ```bash
13
+ npm run build
14
+ npm run test
15
+ npm run docs && npm run docs:json
16
+ ```
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 wtasg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @wtasnorg/node-lib
2
+
3
+ A library project for nodejs.
4
+
5
+ #typescript #library
6
+
7
+ - [npm org](https://www.npmjs.com/org/wtasnorg)
8
+ - [github repo](https://github.com/wtasg/node-lib)
9
+
10
+ ## Develop
11
+
12
+ ```bash
13
+ git clone git@github.com:wtasg/node-lib.git
14
+ npm run build
15
+ npm run test
16
+ # make changes...
17
+ ```
18
+
19
+ We are using `node --test` for testing.
20
+
21
+ ## Install and Usage
22
+
23
+ ```bash
24
+ npm install @wtasnorg/node-lib
25
+ ```
26
+
27
+ ```typescript
28
+ # check if you can run code
29
+ import {hello} from "@wtasnorg/node-lib";
30
+
31
+ hello();
32
+ // "hello from @wtasnorg/node-lib"
33
+ ```
34
+
35
+ ## License: MIT
36
+
37
+ [MIT License file](LICENSE)
package/docs/README.md ADDED
@@ -0,0 +1,41 @@
1
+ **@wtasnorg/node-lib**
2
+
3
+ ***
4
+
5
+ # @wtasnorg/node-lib
6
+
7
+ A library project for nodejs.
8
+
9
+ #typescript #library
10
+
11
+ - [npm org](https://www.npmjs.com/org/wtasnorg)
12
+ - [github repo](https://github.com/wtasg/node-lib)
13
+
14
+ ## Develop
15
+
16
+ ```bash
17
+ git clone git@github.com:wtasg/node-lib.git
18
+ npm run build
19
+ npm run test
20
+ # make changes...
21
+ ```
22
+
23
+ We are using `node --test` for testing.
24
+
25
+ ## Install and Usage
26
+
27
+ ```bash
28
+ npm install @wtasnorg/node-lib
29
+ ```
30
+
31
+ ```typescript
32
+ # check if you can run code
33
+ import {hello} from "@wtasnorg/node-lib";
34
+
35
+ hello();
36
+ // "hello from @wtasnorg/node-lib"
37
+ ```
38
+
39
+ ## License: MIT
40
+
41
+ [MIT License file](_media/LICENSE)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 wtasg
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/docs/docs.json ADDED
@@ -0,0 +1,149 @@
1
+ {
2
+ "schemaVersion": "2.0",
3
+ "id": 0,
4
+ "name": "@wtasnorg/node-lib",
5
+ "variant": "project",
6
+ "kind": 1,
7
+ "flags": {},
8
+ "children": [
9
+ {
10
+ "id": 1,
11
+ "name": "hello",
12
+ "variant": "declaration",
13
+ "kind": 64,
14
+ "flags": {},
15
+ "sources": [
16
+ {
17
+ "fileName": "hello.ts",
18
+ "line": 6,
19
+ "character": 9
20
+ }
21
+ ],
22
+ "signatures": [
23
+ {
24
+ "id": 2,
25
+ "name": "hello",
26
+ "variant": "signature",
27
+ "kind": 4096,
28
+ "flags": {},
29
+ "comment": {
30
+ "summary": [
31
+ {
32
+ "kind": "text",
33
+ "text": "A sample function that should work to test if lib is installed correctly."
34
+ }
35
+ ],
36
+ "blockTags": [
37
+ {
38
+ "tag": "@returns",
39
+ "content": [
40
+ {
41
+ "kind": "text",
42
+ "text": "hello message"
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ },
48
+ "sources": [
49
+ {
50
+ "fileName": "hello.ts",
51
+ "line": 6,
52
+ "character": 9
53
+ }
54
+ ],
55
+ "type": {
56
+ "type": "intrinsic",
57
+ "name": "string"
58
+ }
59
+ }
60
+ ]
61
+ }
62
+ ],
63
+ "groups": [
64
+ {
65
+ "title": "Functions",
66
+ "children": [
67
+ 1
68
+ ]
69
+ }
70
+ ],
71
+ "packageName": "@wtasnorg/node-lib",
72
+ "readme": [
73
+ {
74
+ "kind": "text",
75
+ "text": "# @wtasnorg/node-lib\n\nA library project for nodejs.\n\n#typescript #library\n\n- [npm org](https://www.npmjs.com/org/wtasnorg)\n- [github repo](https://github.com/wtasg/node-lib)\n\n## Develop\n\n"
76
+ },
77
+ {
78
+ "kind": "code",
79
+ "text": "```bash\ngit clone git@github.com:wtasg/node-lib.git\nnpm run build\nnpm run test\n# make changes...\n```"
80
+ },
81
+ {
82
+ "kind": "text",
83
+ "text": "\n\nWe are using "
84
+ },
85
+ {
86
+ "kind": "code",
87
+ "text": "`node --test`"
88
+ },
89
+ {
90
+ "kind": "text",
91
+ "text": " for testing.\n\n## Install and Usage\n\n"
92
+ },
93
+ {
94
+ "kind": "code",
95
+ "text": "```bash\nnpm install @wtasnorg/node-lib\n```"
96
+ },
97
+ {
98
+ "kind": "text",
99
+ "text": "\n\n"
100
+ },
101
+ {
102
+ "kind": "code",
103
+ "text": "```typescript\n# check if you can run code\nimport {hello} from \"@wtasnorg/node-lib\";\n\nhello(); \n// \"hello from @wtasnorg/node-lib\"\n```"
104
+ },
105
+ {
106
+ "kind": "text",
107
+ "text": "\n\n## License: MIT\n\n[MIT License file]("
108
+ },
109
+ {
110
+ "kind": "relative-link",
111
+ "text": "LICENSE",
112
+ "target": 2
113
+ },
114
+ {
115
+ "kind": "text",
116
+ "text": ")"
117
+ }
118
+ ],
119
+ "symbolIdMap": {
120
+ "0": {
121
+ "packageName": "@wtasnorg/node-lib",
122
+ "packagePath": "src/index.ts",
123
+ "qualifiedName": ""
124
+ },
125
+ "1": {
126
+ "packageName": "@wtasnorg/node-lib",
127
+ "packagePath": "src/hello.ts",
128
+ "qualifiedName": "hello"
129
+ },
130
+ "2": {
131
+ "packageName": "@wtasnorg/node-lib",
132
+ "packagePath": "src/hello.ts",
133
+ "qualifiedName": "hello"
134
+ }
135
+ },
136
+ "files": {
137
+ "entries": {
138
+ "1": "src/index.ts",
139
+ "2": "LICENSE",
140
+ "3": "README.md",
141
+ "4": ""
142
+ },
143
+ "reflections": {
144
+ "1": 0,
145
+ "3": 0,
146
+ "4": 0
147
+ }
148
+ }
149
+ }
@@ -0,0 +1,19 @@
1
+ [**@wtasnorg/node-lib**](../README.md)
2
+
3
+ ***
4
+
5
+ [@wtasnorg/node-lib](../globals.md) / hello
6
+
7
+ # Function: hello()
8
+
9
+ > **hello**(): `string`
10
+
11
+ Defined in: hello.ts:6
12
+
13
+ A sample function that should work to test if lib is installed correctly.
14
+
15
+ ## Returns
16
+
17
+ `string`
18
+
19
+ hello message
@@ -0,0 +1,9 @@
1
+ [**@wtasnorg/node-lib**](README.md)
2
+
3
+ ***
4
+
5
+ # @wtasnorg/node-lib
6
+
7
+ ## Functions
8
+
9
+ - [hello](functions/hello.md)
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@wtasnorg/node-lib",
3
+ "version": "0.0.1",
4
+ "description": "node library",
5
+ "scripts": {
6
+ "build": "./node_modules/.bin/tsc --project tsconfig.json",
7
+ "docs": "./node_modules/.bin/typedoc",
8
+ "docs:json": "./node_modules/.bin/typedoc --json docs/docs.json",
9
+ "docs:watch": "./node_modules/.bin/typedoc --watch",
10
+ "test": "node --test"
11
+ },
12
+ "keywords": [
13
+ "library"
14
+ ],
15
+ "author": "wtasn <5f87le8sh@mozmail.com> (https://github.com/wtasg)",
16
+ "license": "MIT",
17
+ "type": "module",
18
+ "os": [
19
+ "!win32"
20
+ ],
21
+ "cpu": [
22
+ "x64"
23
+ ],
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/wtasg/node-lib.git"
27
+ },
28
+ "devDependencies": {
29
+ "@types/node": "^24.10.1",
30
+ "typedoc": "^0.28.14",
31
+ "typedoc-plugin-markdown": "^4.9.0",
32
+ "typescript": "^5.9.3"
33
+ }
34
+ }
package/src/hello.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /**
2
+ * A sample function that should work to test if lib is installed correctly.
3
+ *
4
+ * @returns hello message
5
+ */
6
+ declare function hello(): string;
7
+ export { hello };
8
+ //# sourceMappingURL=hello.d.ts.map
package/src/hello.js ADDED
@@ -0,0 +1,14 @@
1
+ /**
2
+ * A sample function that should work to test if lib is installed correctly.
3
+ *
4
+ * @returns hello message
5
+ */
6
+ function hello() {
7
+ const message = "hello from @wtasnorg/node-lib";
8
+ if (console?.log) {
9
+ console.log(message);
10
+ }
11
+ return message;
12
+ }
13
+ export { hello };
14
+ //# sourceMappingURL=hello.js.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hello.test.d.ts.map
@@ -0,0 +1,16 @@
1
+ import { describe, it } from "node:test";
2
+ import { strictEqual } from "node:assert";
3
+ import { hello } from "./hello.js";
4
+ describe("hello", () => {
5
+ it("returns a string that has the word 'hello' in it", () => {
6
+ const expected = true;
7
+ const actual = hello();
8
+ strictEqual(actual.includes("hello"), expected);
9
+ });
10
+ it("returns exact string", () => {
11
+ const expected = "hello from @wtasnorg/node-lib";
12
+ const actual = hello();
13
+ strictEqual(actual, expected);
14
+ });
15
+ });
16
+ //# sourceMappingURL=hello.test.js.map
@@ -0,0 +1,17 @@
1
+ import { describe, it } from "node:test";
2
+ import { strictEqual } from "node:assert";
3
+ import { hello } from "./hello.js";
4
+
5
+ describe("hello", () => {
6
+ it("returns a string that has the word 'hello' in it", () => {
7
+ const expected = true;
8
+ const actual = hello();
9
+ strictEqual(actual.includes("hello"), expected);
10
+ });
11
+
12
+ it("returns exact string", () => {
13
+ const expected = "hello from @wtasnorg/node-lib";
14
+ const actual = hello();
15
+ strictEqual(actual, expected);
16
+ });
17
+ });
package/src/hello.ts ADDED
@@ -0,0 +1,16 @@
1
+ /**
2
+ * A sample function that should work to test if lib is installed correctly.
3
+ *
4
+ * @returns hello message
5
+ */
6
+ function hello() {
7
+ const message = "hello from @wtasnorg/node-lib";
8
+ if (console?.log) {
9
+ console.log(message);
10
+ }
11
+ return message;
12
+ }
13
+
14
+ export {
15
+ hello
16
+ };
package/src/index.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { hello } from "./hello.js";
2
+ export { hello };
3
+ //# sourceMappingURL=index.d.ts.map
package/src/index.js ADDED
@@ -0,0 +1,3 @@
1
+ import { hello } from "./hello.js";
2
+ export { hello };
3
+ //# sourceMappingURL=index.js.map
package/src/index.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { hello } from "./hello.js";
2
+
3
+ export { hello };
package/tsconfig.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "compilerOptions": {
3
+ "rootDir": "./src",
4
+ "module": "nodenext",
5
+ "target": "esnext",
6
+ "lib": [
7
+ "esnext"
8
+ ],
9
+ "types": [
10
+ "node"
11
+ ],
12
+ "sourceMap": true,
13
+ "declaration": true,
14
+ "declarationMap": true,
15
+ "noUncheckedIndexedAccess": true,
16
+ "exactOptionalPropertyTypes": true,
17
+ "noImplicitReturns": true,
18
+ "noImplicitOverride": true,
19
+ "noUnusedLocals": true,
20
+ "noUnusedParameters": true,
21
+ "noFallthroughCasesInSwitch": true,
22
+ "noPropertyAccessFromIndexSignature": true,
23
+ "strict": true,
24
+ "jsx": "react-jsx",
25
+ "verbatimModuleSyntax": true,
26
+ "isolatedModules": true,
27
+ "noUncheckedSideEffectImports": true,
28
+ "moduleDetection": "force",
29
+ "skipLibCheck": true,
30
+ }
31
+ }
package/typedoc.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://typedoc.org/schema.json",
3
+ "entryPoints": ["./src/index.ts"],
4
+ "excludePrivate": true,
5
+ "excludeProtected": true,
6
+ "name": "@wtasnorg/node-lib",
7
+ "out": "docs",
8
+ "plugin": ["typedoc-plugin-markdown"],
9
+ "theme": "default",
10
+ "tsconfig": "./tsconfig.json",
11
+ }