@oliversalzburg/js-utils 0.0.7 → 0.0.9

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.
Files changed (172) hide show
  1. package/LICENSES.md +17 -0
  2. package/_site/assets/highlight.css +57 -0
  3. package/_site/assets/main.js +59 -0
  4. package/_site/assets/navigation.js +1 -0
  5. package/_site/assets/search.js +1 -0
  6. package/_site/assets/style.css +1383 -0
  7. package/_site/classes/AbstractError.html +28 -0
  8. package/_site/classes/Canvas.html +44 -0
  9. package/_site/classes/InternalError.html +32 -0
  10. package/_site/classes/InvalidArgumentError.html +28 -0
  11. package/_site/classes/InvalidOperationError.html +28 -0
  12. package/_site/classes/NotImplementedError.html +27 -0
  13. package/_site/classes/PermissionViolationError.html +28 -0
  14. package/_site/classes/Random.html +43 -0
  15. package/_site/classes/RenderLoop.html +30 -0
  16. package/_site/classes/ResourceConflictError.html +27 -0
  17. package/_site/classes/UnexpectedNilError.html +15 -0
  18. package/_site/classes/UnknownError.html +31 -0
  19. package/_site/classes/Vector2.html +113 -0
  20. package/_site/classes/Vector3.html +28 -0
  21. package/_site/functions/addVector2.html +5 -0
  22. package/_site/functions/blend.html +8 -0
  23. package/_site/functions/blendAdditive.html +8 -0
  24. package/_site/functions/blendSubtractive.html +8 -0
  25. package/_site/functions/cosDeg.html +4 -0
  26. package/_site/functions/deg2rad.html +4 -0
  27. package/_site/functions/difference.html +7 -0
  28. package/_site/functions/distance.html +7 -0
  29. package/_site/functions/errorToJSON.html +4 -0
  30. package/_site/functions/errorToRecord.html +4 -0
  31. package/_site/functions/errorToSimpleSerializable.html +4 -0
  32. package/_site/functions/filterType.html +7 -0
  33. package/_site/functions/formatString.html +7 -0
  34. package/_site/functions/formatStringTemplate.html +7 -0
  35. package/_site/functions/fromRGB.html +7 -0
  36. package/_site/functions/fromRGBA.html +7 -0
  37. package/_site/functions/getA.html +4 -0
  38. package/_site/functions/getB.html +4 -0
  39. package/_site/functions/getDocumentElementTypeById.html +9 -0
  40. package/_site/functions/getG.html +4 -0
  41. package/_site/functions/getR.html +4 -0
  42. package/_site/functions/intersect.html +8 -0
  43. package/_site/functions/is.html +7 -0
  44. package/_site/functions/isError.html +4 -0
  45. package/_site/functions/isInteger.html +4 -0
  46. package/_site/functions/isNil.html +5 -0
  47. package/_site/functions/isqrt.html +4 -0
  48. package/_site/functions/multiplyVector2.html +5 -0
  49. package/_site/functions/mustExist.html +6 -0
  50. package/_site/functions/nextPalette.html +2 -0
  51. package/_site/functions/putPixel32.html +7 -0
  52. package/_site/functions/putPixel32Add.html +7 -0
  53. package/_site/functions/putPixel32Sub.html +7 -0
  54. package/_site/functions/putSubPixel32.html +8 -0
  55. package/_site/functions/rad2deg.html +4 -0
  56. package/_site/functions/randomRange.html +6 -0
  57. package/_site/functions/safeRGBComponent.html +4 -0
  58. package/_site/functions/seedFromString.html +5 -0
  59. package/_site/functions/shuffleArray.html +5 -0
  60. package/_site/functions/sinDeg.html +4 -0
  61. package/_site/functions/sleep.html +4 -0
  62. package/_site/functions/somecolor.html +4 -0
  63. package/_site/functions/subtractVector2.html +5 -0
  64. package/_site/functions/toGrayScale.html +4 -0
  65. package/_site/functions/unknownToError.html +6 -0
  66. package/_site/index.html +1 -0
  67. package/_site/modules.html +72 -0
  68. package/_site/types/AnyConstructor.html +2 -0
  69. package/_site/types/AnyFunction.html +2 -0
  70. package/_site/types/ConstructorOf.html +2 -0
  71. package/_site/types/FunctionReturning.html +2 -0
  72. package/_site/types/Maybe.html +2 -0
  73. package/_site/types/Mixin.html +3 -0
  74. package/_site/types/Nil.html +3 -0
  75. package/_site/types/RenderLoopCallback.html +2 -0
  76. package/_site/types/SerializedError.html +2 -0
  77. package/_site/variables/PALETTES.html +2 -0
  78. package/_site/variables/TWO_PI.html +2 -0
  79. package/_site/variables/random-1.html +2 -0
  80. package/lib/array.d.ts +8 -0
  81. package/lib/array.js +8 -0
  82. package/lib/array.js.map +1 -1
  83. package/lib/dom/core.d.ts +13 -0
  84. package/lib/dom/core.js +24 -0
  85. package/lib/dom/core.js.map +1 -0
  86. package/lib/dom/index.d.ts +1 -0
  87. package/lib/dom/index.js +2 -0
  88. package/lib/dom/index.js.map +1 -0
  89. package/lib/error-serializer.d.ts +12 -6
  90. package/lib/error-serializer.js +11 -7
  91. package/lib/error-serializer.js.map +1 -1
  92. package/lib/error-serializer.test.d.ts +1 -0
  93. package/lib/error-serializer.test.js +117 -0
  94. package/lib/error-serializer.test.js.map +1 -0
  95. package/lib/errors/AbstractError.d.ts +4 -16
  96. package/lib/errors/AbstractError.js +4 -16
  97. package/lib/errors/AbstractError.js.map +1 -1
  98. package/lib/errors/InternalError.d.ts +6 -5
  99. package/lib/errors/InternalError.js +6 -7
  100. package/lib/errors/InternalError.js.map +1 -1
  101. package/lib/errors/InvalidArgumentError.d.ts +2 -1
  102. package/lib/errors/InvalidArgumentError.js +2 -1
  103. package/lib/errors/InvalidArgumentError.js.map +1 -1
  104. package/lib/errors/InvalidOperationError.d.ts +2 -1
  105. package/lib/errors/InvalidOperationError.js +2 -1
  106. package/lib/errors/InvalidOperationError.js.map +1 -1
  107. package/lib/errors/NotImplementedError.d.ts +2 -1
  108. package/lib/errors/NotImplementedError.js +2 -1
  109. package/lib/errors/NotImplementedError.js.map +1 -1
  110. package/lib/errors/PermissionViolationError.d.ts +2 -1
  111. package/lib/errors/PermissionViolationError.js +2 -1
  112. package/lib/errors/PermissionViolationError.js.map +1 -1
  113. package/lib/errors/ResourceConflictError.d.ts +2 -1
  114. package/lib/errors/ResourceConflictError.js +2 -1
  115. package/lib/errors/ResourceConflictError.js.map +1 -1
  116. package/lib/errors/UnknownError.d.ts +6 -5
  117. package/lib/errors/UnknownError.js +6 -5
  118. package/lib/errors/UnknownError.js.map +1 -1
  119. package/lib/graphics/canvas.d.ts +55 -19
  120. package/lib/graphics/canvas.js +66 -18
  121. package/lib/graphics/canvas.js.map +1 -1
  122. package/lib/graphics/core.d.ts +18 -0
  123. package/lib/graphics/core.js +18 -0
  124. package/lib/graphics/core.js.map +1 -1
  125. package/lib/graphics/render-loop.d.ts +25 -4
  126. package/lib/graphics/render-loop.js +19 -2
  127. package/lib/graphics/render-loop.js.map +1 -1
  128. package/lib/index.d.ts +1 -0
  129. package/lib/index.js +1 -0
  130. package/lib/index.js.map +1 -1
  131. package/lib/math/core.d.ts +12 -1
  132. package/lib/math/core.js +13 -2
  133. package/lib/math/core.js.map +1 -1
  134. package/lib/math/index.d.ts +2 -0
  135. package/lib/math/index.js +2 -0
  136. package/lib/math/index.js.map +1 -1
  137. package/lib/math/vector.d.ts +2 -33
  138. package/lib/math/vector.js +2 -41
  139. package/lib/math/vector.js.map +1 -1
  140. package/lib/math/vector2.d.ts +195 -0
  141. package/lib/math/vector2.js +299 -0
  142. package/lib/math/vector2.js.map +1 -0
  143. package/lib/math/vector3.d.ts +46 -0
  144. package/lib/math/vector3.js +59 -0
  145. package/lib/math/vector3.js.map +1 -0
  146. package/lib/nil.d.ts +1 -0
  147. package/lib/nil.js +1 -0
  148. package/lib/nil.js.map +1 -1
  149. package/lib/random.d.ts +40 -4
  150. package/lib/random.js +175 -14
  151. package/lib/random.js.map +1 -1
  152. package/lib/string-formatter.d.ts +2 -0
  153. package/lib/string-formatter.js +2 -0
  154. package/lib/string-formatter.js.map +1 -1
  155. package/package.json +10 -10
  156. package/docs/README.md +0 -3
  157. package/docs/classes/AbstractError.md +0 -271
  158. package/docs/classes/Canvas.md +0 -177
  159. package/docs/classes/InternalError.md +0 -301
  160. package/docs/classes/InvalidArgumentError.md +0 -277
  161. package/docs/classes/InvalidOperationError.md +0 -277
  162. package/docs/classes/NotImplementedError.md +0 -276
  163. package/docs/classes/PermissionViolationError.md +0 -277
  164. package/docs/classes/Random.md +0 -109
  165. package/docs/classes/RenderLoop.md +0 -49
  166. package/docs/classes/ResourceConflictError.md +0 -276
  167. package/docs/classes/UnexpectedNilError.md +0 -169
  168. package/docs/classes/UnknownError.md +0 -280
  169. package/docs/classes/Vector2.md +0 -79
  170. package/docs/classes/Vector3.md +0 -106
  171. package/docs/modules.md +0 -1313
  172. package/typedoc.json +0 -8
@@ -1,277 +0,0 @@
1
- [@oliversalzburg/js-utils](../README.md) / [Exports](../modules.md) / InvalidOperationError
2
-
3
- # Class: InvalidOperationError
4
-
5
- Used when an operation was attempted that can not be completed in the current
6
- context.
7
-
8
- ## Hierarchy
9
-
10
- - [`AbstractError`](AbstractError.md)
11
-
12
- ↳ **`InvalidOperationError`**
13
-
14
- ## Constructors
15
-
16
- ### constructor
17
-
18
- • **new InvalidOperationError**(`message`, `status?`): [`InvalidOperationError`](InvalidOperationError.md)
19
-
20
- Constructs a new [InvalidOperationError](InvalidOperationError.md).
21
-
22
- #### Parameters
23
-
24
- | Name | Type | Default value | Description |
25
- | :-------- | :------- | :------------ | :------------------------------ |
26
- | `message` | `string` | `undefined` | The main error message. |
27
- | `status` | `number` | `400` | The HTTP status code to return. |
28
-
29
- #### Returns
30
-
31
- [`InvalidOperationError`](InvalidOperationError.md)
32
-
33
- #### Overrides
34
-
35
- [AbstractError](AbstractError.md).[constructor](AbstractError.md#constructor)
36
-
37
- #### Defined in
38
-
39
- [errors/InvalidOperationError.ts:13](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/InvalidOperationError.ts#L13)
40
-
41
- ## Properties
42
-
43
- ### cause
44
-
45
- • `Optional` **cause**: `unknown`
46
-
47
- #### Inherited from
48
-
49
- [AbstractError](AbstractError.md).[cause](AbstractError.md#cause)
50
-
51
- #### Defined in
52
-
53
- ../node_modules/typescript/lib/lib.es2022.error.d.ts:24
54
-
55
- ---
56
-
57
- ### code
58
-
59
- • **code**: `string`
60
-
61
- An application-unique, readable error code.
62
-
63
- #### Inherited from
64
-
65
- [AbstractError](AbstractError.md).[code](AbstractError.md#code)
66
-
67
- #### Defined in
68
-
69
- [errors/AbstractError.ts:29](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L29)
70
-
71
- ---
72
-
73
- ### info
74
-
75
- • **info**: [`Maybe`](../modules.md#maybe)\<`string`\>
76
-
77
- A user-friendly error message that may be transported to the client.
78
-
79
- **`Deprecated`**
80
-
81
- User-friendly errors should be read from `extensions`.
82
-
83
- #### Inherited from
84
-
85
- [AbstractError](AbstractError.md).[info](AbstractError.md#info)
86
-
87
- #### Defined in
88
-
89
- [errors/AbstractError.ts:24](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L24)
90
-
91
- ---
92
-
93
- ### inner
94
-
95
- • **inner**: [`Maybe`](../modules.md#maybe)\<`Error`\>
96
-
97
- Another error that should be transported with this error.
98
-
99
- **`Deprecated`**
100
-
101
- We don't make use of this or interpret nested errors at all.
102
-
103
- #### Inherited from
104
-
105
- [AbstractError](AbstractError.md).[inner](AbstractError.md#inner)
106
-
107
- #### Defined in
108
-
109
- [errors/AbstractError.ts:18](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L18)
110
-
111
- ---
112
-
113
- ### message
114
-
115
- • **message**: `string`
116
-
117
- #### Inherited from
118
-
119
- [AbstractError](AbstractError.md).[message](AbstractError.md#message)
120
-
121
- #### Defined in
122
-
123
- ../node_modules/typescript/lib/lib.es5.d.ts:1068
124
-
125
- ---
126
-
127
- ### name
128
-
129
- • **name**: `string`
130
-
131
- #### Inherited from
132
-
133
- [AbstractError](AbstractError.md).[name](AbstractError.md#name)
134
-
135
- #### Defined in
136
-
137
- ../node_modules/typescript/lib/lib.es5.d.ts:1067
138
-
139
- ---
140
-
141
- ### stack
142
-
143
- • `Optional` **stack**: `string`
144
-
145
- #### Inherited from
146
-
147
- [AbstractError](AbstractError.md).[stack](AbstractError.md#stack)
148
-
149
- #### Defined in
150
-
151
- ../node_modules/typescript/lib/lib.es5.d.ts:1069
152
-
153
- ---
154
-
155
- ### status
156
-
157
- • **status**: `number`
158
-
159
- The HTTP status code to associate with this error.
160
-
161
- **`Deprecated`**
162
-
163
- We no longer respond to HTTP requests with error-specifc
164
- status codes.
165
-
166
- #### Inherited from
167
-
168
- [AbstractError](AbstractError.md).[status](AbstractError.md#status)
169
-
170
- #### Defined in
171
-
172
- [errors/AbstractError.ts:12](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L12)
173
-
174
- ---
175
-
176
- ### prepareStackTrace
177
-
178
- ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any`
179
-
180
- #### Type declaration
181
-
182
- ▸ (`err`, `stackTraces`): `any`
183
-
184
- Optional override for formatting stack traces
185
-
186
- ##### Parameters
187
-
188
- | Name | Type |
189
- | :------------ | :----------- |
190
- | `err` | `Error` |
191
- | `stackTraces` | `CallSite`[] |
192
-
193
- ##### Returns
194
-
195
- `any`
196
-
197
- **`See`**
198
-
199
- https://v8.dev/docs/stack-trace-api#customizing-stack-traces
200
-
201
- #### Inherited from
202
-
203
- [AbstractError](AbstractError.md).[prepareStackTrace](AbstractError.md#preparestacktrace)
204
-
205
- #### Defined in
206
-
207
- ../node_modules/@types/node/globals.d.ts:11
208
-
209
- ---
210
-
211
- ### stackTraceLimit
212
-
213
- ▪ `Static` **stackTraceLimit**: `number`
214
-
215
- #### Inherited from
216
-
217
- [AbstractError](AbstractError.md).[stackTraceLimit](AbstractError.md#stacktracelimit)
218
-
219
- #### Defined in
220
-
221
- ../node_modules/@types/node/globals.d.ts:13
222
-
223
- ## Methods
224
-
225
- ### captureStackTrace
226
-
227
- ▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
228
-
229
- Create .stack property on a target object
230
-
231
- #### Parameters
232
-
233
- | Name | Type |
234
- | :---------------- | :--------- |
235
- | `targetObject` | `object` |
236
- | `constructorOpt?` | `Function` |
237
-
238
- #### Returns
239
-
240
- `void`
241
-
242
- #### Inherited from
243
-
244
- [AbstractError](AbstractError.md).[captureStackTrace](AbstractError.md#capturestacktrace)
245
-
246
- #### Defined in
247
-
248
- ../node_modules/@types/node/globals.d.ts:4
249
-
250
- ---
251
-
252
- ### isAbstractError
253
-
254
- ▸ **isAbstractError**(`error`, `allowForeignModule?`): error is AbstractError
255
-
256
- Checks if an object is an instance of [AbstractError](AbstractError.md), or one of its subclasses.
257
-
258
- #### Parameters
259
-
260
- | Name | Type | Default value | Description |
261
- | :------------------- | :-------- | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
262
- | `error` | `unknown` | `undefined` | The object to check. |
263
- | `allowForeignModule` | `boolean` | `true` | Only check for similar looking error codes. You're going to want to use this if you're dealing with a setup where multiple versions of js-utils are loaded. |
264
-
265
- #### Returns
266
-
267
- error is AbstractError
268
-
269
- `true` if the object is an [AbstractError](AbstractError.md), `false` otherwise.
270
-
271
- #### Inherited from
272
-
273
- [AbstractError](AbstractError.md).[isAbstractError](AbstractError.md#isabstracterror)
274
-
275
- #### Defined in
276
-
277
- [errors/AbstractError.ts:58](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L58)
@@ -1,276 +0,0 @@
1
- [@oliversalzburg/js-utils](../README.md) / [Exports](../modules.md) / NotImplementedError
2
-
3
- # Class: NotImplementedError
4
-
5
- Used when a called method actually hasn't been implemented yet (whoops).
6
-
7
- ## Hierarchy
8
-
9
- - [`AbstractError`](AbstractError.md)
10
-
11
- ↳ **`NotImplementedError`**
12
-
13
- ## Constructors
14
-
15
- ### constructor
16
-
17
- • **new NotImplementedError**(`message`, `status?`): [`NotImplementedError`](NotImplementedError.md)
18
-
19
- Constructs a new [NotImplementedError](NotImplementedError.md).
20
-
21
- #### Parameters
22
-
23
- | Name | Type | Default value | Description |
24
- | :-------- | :------- | :------------ | :------------------------------ |
25
- | `message` | `string` | `undefined` | The main error message. |
26
- | `status` | `number` | `501` | The HTTP status code to return. |
27
-
28
- #### Returns
29
-
30
- [`NotImplementedError`](NotImplementedError.md)
31
-
32
- #### Overrides
33
-
34
- [AbstractError](AbstractError.md).[constructor](AbstractError.md#constructor)
35
-
36
- #### Defined in
37
-
38
- [errors/NotImplementedError.ts:12](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/NotImplementedError.ts#L12)
39
-
40
- ## Properties
41
-
42
- ### cause
43
-
44
- • `Optional` **cause**: `unknown`
45
-
46
- #### Inherited from
47
-
48
- [AbstractError](AbstractError.md).[cause](AbstractError.md#cause)
49
-
50
- #### Defined in
51
-
52
- ../node_modules/typescript/lib/lib.es2022.error.d.ts:24
53
-
54
- ---
55
-
56
- ### code
57
-
58
- • **code**: `string`
59
-
60
- An application-unique, readable error code.
61
-
62
- #### Inherited from
63
-
64
- [AbstractError](AbstractError.md).[code](AbstractError.md#code)
65
-
66
- #### Defined in
67
-
68
- [errors/AbstractError.ts:29](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L29)
69
-
70
- ---
71
-
72
- ### info
73
-
74
- • **info**: [`Maybe`](../modules.md#maybe)\<`string`\>
75
-
76
- A user-friendly error message that may be transported to the client.
77
-
78
- **`Deprecated`**
79
-
80
- User-friendly errors should be read from `extensions`.
81
-
82
- #### Inherited from
83
-
84
- [AbstractError](AbstractError.md).[info](AbstractError.md#info)
85
-
86
- #### Defined in
87
-
88
- [errors/AbstractError.ts:24](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L24)
89
-
90
- ---
91
-
92
- ### inner
93
-
94
- • **inner**: [`Maybe`](../modules.md#maybe)\<`Error`\>
95
-
96
- Another error that should be transported with this error.
97
-
98
- **`Deprecated`**
99
-
100
- We don't make use of this or interpret nested errors at all.
101
-
102
- #### Inherited from
103
-
104
- [AbstractError](AbstractError.md).[inner](AbstractError.md#inner)
105
-
106
- #### Defined in
107
-
108
- [errors/AbstractError.ts:18](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L18)
109
-
110
- ---
111
-
112
- ### message
113
-
114
- • **message**: `string`
115
-
116
- #### Inherited from
117
-
118
- [AbstractError](AbstractError.md).[message](AbstractError.md#message)
119
-
120
- #### Defined in
121
-
122
- ../node_modules/typescript/lib/lib.es5.d.ts:1068
123
-
124
- ---
125
-
126
- ### name
127
-
128
- • **name**: `string`
129
-
130
- #### Inherited from
131
-
132
- [AbstractError](AbstractError.md).[name](AbstractError.md#name)
133
-
134
- #### Defined in
135
-
136
- ../node_modules/typescript/lib/lib.es5.d.ts:1067
137
-
138
- ---
139
-
140
- ### stack
141
-
142
- • `Optional` **stack**: `string`
143
-
144
- #### Inherited from
145
-
146
- [AbstractError](AbstractError.md).[stack](AbstractError.md#stack)
147
-
148
- #### Defined in
149
-
150
- ../node_modules/typescript/lib/lib.es5.d.ts:1069
151
-
152
- ---
153
-
154
- ### status
155
-
156
- • **status**: `number`
157
-
158
- The HTTP status code to associate with this error.
159
-
160
- **`Deprecated`**
161
-
162
- We no longer respond to HTTP requests with error-specifc
163
- status codes.
164
-
165
- #### Inherited from
166
-
167
- [AbstractError](AbstractError.md).[status](AbstractError.md#status)
168
-
169
- #### Defined in
170
-
171
- [errors/AbstractError.ts:12](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L12)
172
-
173
- ---
174
-
175
- ### prepareStackTrace
176
-
177
- ▪ `Static` `Optional` **prepareStackTrace**: (`err`: `Error`, `stackTraces`: `CallSite`[]) => `any`
178
-
179
- #### Type declaration
180
-
181
- ▸ (`err`, `stackTraces`): `any`
182
-
183
- Optional override for formatting stack traces
184
-
185
- ##### Parameters
186
-
187
- | Name | Type |
188
- | :------------ | :----------- |
189
- | `err` | `Error` |
190
- | `stackTraces` | `CallSite`[] |
191
-
192
- ##### Returns
193
-
194
- `any`
195
-
196
- **`See`**
197
-
198
- https://v8.dev/docs/stack-trace-api#customizing-stack-traces
199
-
200
- #### Inherited from
201
-
202
- [AbstractError](AbstractError.md).[prepareStackTrace](AbstractError.md#preparestacktrace)
203
-
204
- #### Defined in
205
-
206
- ../node_modules/@types/node/globals.d.ts:11
207
-
208
- ---
209
-
210
- ### stackTraceLimit
211
-
212
- ▪ `Static` **stackTraceLimit**: `number`
213
-
214
- #### Inherited from
215
-
216
- [AbstractError](AbstractError.md).[stackTraceLimit](AbstractError.md#stacktracelimit)
217
-
218
- #### Defined in
219
-
220
- ../node_modules/@types/node/globals.d.ts:13
221
-
222
- ## Methods
223
-
224
- ### captureStackTrace
225
-
226
- ▸ **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
227
-
228
- Create .stack property on a target object
229
-
230
- #### Parameters
231
-
232
- | Name | Type |
233
- | :---------------- | :--------- |
234
- | `targetObject` | `object` |
235
- | `constructorOpt?` | `Function` |
236
-
237
- #### Returns
238
-
239
- `void`
240
-
241
- #### Inherited from
242
-
243
- [AbstractError](AbstractError.md).[captureStackTrace](AbstractError.md#capturestacktrace)
244
-
245
- #### Defined in
246
-
247
- ../node_modules/@types/node/globals.d.ts:4
248
-
249
- ---
250
-
251
- ### isAbstractError
252
-
253
- ▸ **isAbstractError**(`error`, `allowForeignModule?`): error is AbstractError
254
-
255
- Checks if an object is an instance of [AbstractError](AbstractError.md), or one of its subclasses.
256
-
257
- #### Parameters
258
-
259
- | Name | Type | Default value | Description |
260
- | :------------------- | :-------- | :------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
261
- | `error` | `unknown` | `undefined` | The object to check. |
262
- | `allowForeignModule` | `boolean` | `true` | Only check for similar looking error codes. You're going to want to use this if you're dealing with a setup where multiple versions of js-utils are loaded. |
263
-
264
- #### Returns
265
-
266
- error is AbstractError
267
-
268
- `true` if the object is an [AbstractError](AbstractError.md), `false` otherwise.
269
-
270
- #### Inherited from
271
-
272
- [AbstractError](AbstractError.md).[isAbstractError](AbstractError.md#isabstracterror)
273
-
274
- #### Defined in
275
-
276
- [errors/AbstractError.ts:58](https://github.com/oliversalzburg/js-utils/blob/293b24f/source/errors/AbstractError.ts#L58)