@wtasnorg/node-lib 0.0.4 → 0.0.5

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/docs/docs.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "fileName": "hello.ts",
18
18
  "line": 6,
19
19
  "character": 15,
20
- "url": "https://github.com/wtasg/node-lib/blob/be4189222f32cc9b2fdf81c380cde5c51f69046c/src/hello.ts#L6"
20
+ "url": "https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/hello.ts#L6"
21
21
  }
22
22
  ],
23
23
  "signatures": [
@@ -51,7 +51,7 @@
51
51
  "fileName": "hello.ts",
52
52
  "line": 6,
53
53
  "character": 15,
54
- "url": "https://github.com/wtasg/node-lib/blob/be4189222f32cc9b2fdf81c380cde5c51f69046c/src/hello.ts#L6"
54
+ "url": "https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/hello.ts#L6"
55
55
  }
56
56
  ],
57
57
  "type": {
@@ -72,13 +72,122 @@
72
72
  }
73
73
  }
74
74
  ]
75
+ },
76
+ {
77
+ "id": 3,
78
+ "name": "pojo",
79
+ "variant": "declaration",
80
+ "kind": 64,
81
+ "flags": {},
82
+ "sources": [
83
+ {
84
+ "fileName": "pojo.ts",
85
+ "line": 10,
86
+ "character": 9,
87
+ "url": "https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/pojo.ts#L10"
88
+ }
89
+ ],
90
+ "signatures": [
91
+ {
92
+ "id": 4,
93
+ "name": "pojo",
94
+ "variant": "signature",
95
+ "kind": 4096,
96
+ "flags": {},
97
+ "comment": {
98
+ "summary": [
99
+ {
100
+ "kind": "text",
101
+ "text": "Convert a class instance into a plain JavaScript object.\nCopies only the instance's own enumerable data properties\nand excludes methods or prototype values."
102
+ }
103
+ ],
104
+ "blockTags": [
105
+ {
106
+ "tag": "@returns",
107
+ "content": [
108
+ {
109
+ "kind": "text",
110
+ "text": "A plain JavaScript object containing only data fields."
111
+ }
112
+ ]
113
+ }
114
+ ]
115
+ },
116
+ "sources": [
117
+ {
118
+ "fileName": "pojo.ts",
119
+ "line": 10,
120
+ "character": 9,
121
+ "url": "https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/pojo.ts#L10"
122
+ }
123
+ ],
124
+ "typeParameters": [
125
+ {
126
+ "id": 5,
127
+ "name": "T",
128
+ "variant": "typeParam",
129
+ "kind": 131072,
130
+ "flags": {},
131
+ "type": {
132
+ "type": "intrinsic",
133
+ "name": "object"
134
+ }
135
+ }
136
+ ],
137
+ "parameters": [
138
+ {
139
+ "id": 6,
140
+ "name": "instance",
141
+ "variant": "param",
142
+ "kind": 32768,
143
+ "flags": {},
144
+ "comment": {
145
+ "summary": [
146
+ {
147
+ "kind": "text",
148
+ "text": "A class instance to convert."
149
+ }
150
+ ]
151
+ },
152
+ "type": {
153
+ "type": "reference",
154
+ "target": 5,
155
+ "name": "T",
156
+ "package": "@wtasnorg/node-lib",
157
+ "refersToTypeParameter": true
158
+ }
159
+ }
160
+ ],
161
+ "type": {
162
+ "type": "reference",
163
+ "target": {
164
+ "packageName": "typescript",
165
+ "packagePath": "lib/lib.es5.d.ts",
166
+ "qualifiedName": "Record"
167
+ },
168
+ "typeArguments": [
169
+ {
170
+ "type": "intrinsic",
171
+ "name": "string"
172
+ },
173
+ {
174
+ "type": "intrinsic",
175
+ "name": "any"
176
+ }
177
+ ],
178
+ "name": "Record",
179
+ "package": "typescript"
180
+ }
181
+ }
182
+ ]
75
183
  }
76
184
  ],
77
185
  "groups": [
78
186
  {
79
187
  "title": "Functions",
80
188
  "children": [
81
- 1
189
+ 1,
190
+ 3
82
191
  ]
83
192
  }
84
193
  ],
@@ -153,6 +262,26 @@
153
262
  "packageName": "@wtasnorg/node-lib",
154
263
  "packagePath": "src/hello.ts",
155
264
  "qualifiedName": "hello"
265
+ },
266
+ "3": {
267
+ "packageName": "@wtasnorg/node-lib",
268
+ "packagePath": "src/pojo.ts",
269
+ "qualifiedName": "pojo"
270
+ },
271
+ "4": {
272
+ "packageName": "@wtasnorg/node-lib",
273
+ "packagePath": "src/pojo.ts",
274
+ "qualifiedName": "pojo"
275
+ },
276
+ "5": {
277
+ "packageName": "@wtasnorg/node-lib",
278
+ "packagePath": "src/pojo.ts",
279
+ "qualifiedName": "T"
280
+ },
281
+ "6": {
282
+ "packageName": "@wtasnorg/node-lib",
283
+ "packagePath": "src/pojo.ts",
284
+ "qualifiedName": "instance"
156
285
  }
157
286
  },
158
287
  "files": {
@@ -8,7 +8,7 @@
8
8
 
9
9
  > **hello**(): `Promise`\<`string`\>
10
10
 
11
- Defined in: [hello.ts:6](https://github.com/wtasg/node-lib/blob/be4189222f32cc9b2fdf81c380cde5c51f69046c/src/hello.ts#L6)
11
+ Defined in: [hello.ts:6](https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/hello.ts#L6)
12
12
 
13
13
  A sample function that should work to test if lib is installed correctly.
14
14
 
@@ -0,0 +1,35 @@
1
+ [**@wtasnorg/node-lib**](../README.md)
2
+
3
+ ***
4
+
5
+ [@wtasnorg/node-lib](../globals.md) / pojo
6
+
7
+ # Function: pojo()
8
+
9
+ > **pojo**\<`T`\>(`instance`): `Record`\<`string`, `any`\>
10
+
11
+ Defined in: [pojo.ts:10](https://github.com/wtasg/node-lib/blob/890fd5e866d9096470d56594a5788bf55e34bf7c/src/pojo.ts#L10)
12
+
13
+ Convert a class instance into a plain JavaScript object.
14
+ Copies only the instance's own enumerable data properties
15
+ and excludes methods or prototype values.
16
+
17
+ ## Type Parameters
18
+
19
+ ### T
20
+
21
+ `T` *extends* `object`
22
+
23
+ ## Parameters
24
+
25
+ ### instance
26
+
27
+ `T`
28
+
29
+ A class instance to convert.
30
+
31
+ ## Returns
32
+
33
+ `Record`\<`string`, `any`\>
34
+
35
+ A plain JavaScript object containing only data fields.
package/docs/globals.md CHANGED
@@ -7,3 +7,4 @@
7
7
  ## Functions
8
8
 
9
9
  - [hello](functions/hello.md)
10
+ - [pojo](functions/pojo.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wtasnorg/node-lib",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "node library",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  import { hello } from "./hello.js";
2
- export { hello };
2
+ import { pojo } from "./pojo.js";
3
+ export { hello, pojo };
3
4
  //# sourceMappingURL=index.d.ts.map
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  import { hello } from "./hello.js";
2
- export { hello };
2
+ import { pojo } from "./pojo.js";
3
+ export { hello, pojo };
3
4
  //# sourceMappingURL=index.js.map
package/src/index.ts CHANGED
@@ -1,3 +1,7 @@
1
1
  import { hello } from "./hello.js";
2
+ import { pojo } from "./pojo.js";
2
3
 
3
- export { hello };
4
+ export {
5
+ hello,
6
+ pojo
7
+ };