runtime-type-inspector 1.0.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/LICENSE +21 -0
- package/README.md +36 -0
- package/package.json +19 -0
- package/src/index.mjs +1 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Hermann Rolfes
|
|
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,36 @@
|
|
|
1
|
+
`RuntimeTypeInspector.js` - your personal type-checking assistant 🕵️🐞🐛
|
|
2
|
+
|
|
3
|
+
`RuntimeTypeInspector.js` alongside `JSDoc` is a powerful tool which works in tandem with `Babel.js` and `TypeScript` to generate type-asserting JavaScript files. Assertion code is injected into debug builds to perform runtime type checking of each function and method at runtime - a step which is required beyond pure static typing to help emerge the Incident Management Lifecycle.
|
|
4
|
+
|
|
5
|
+
The Incident Management Lifecycle is:
|
|
6
|
+
- Identify - recognize the type incidents
|
|
7
|
+
- Respond - debugging in F12/DevTools
|
|
8
|
+
- Resolve - once the issue is cognized it's resolvable
|
|
9
|
+
- Learn - clarify the issue for yourself and share with others
|
|
10
|
+
|
|
11
|
+
`RuntimeTypeInspector.js` is supporting Identify and Respond of the IML.
|
|
12
|
+
|
|
13
|
+
**Why is this technology critical?**
|
|
14
|
+
|
|
15
|
+
This technology is critical because it provides developers with an organized method to ensure type safety with runtime type issue reports while improving code organization, type safety and documentation - making it easier for other developers to understand the code and enforce good coding standards.
|
|
16
|
+
|
|
17
|
+
RuntimeTypeInspector.js assists the debugging process, since it has a clear definition of what each function expects while issuing warnings, which can act as breakpoints in your source code (as shown in the example debugging session in my showcase video). Finally, good JSDoc can make the entire code base more maintainable, since it's easier for developers to find the specific parts of the code they need to change quickly and easily.
|
|
18
|
+
|
|
19
|
+
**Presentation hunting down a `NaN` bug in the PlayCanvas engine:**
|
|
20
|
+
|
|
21
|
+
https://www.youtube.com/watch?v=o5ipQe2rVKQ
|
|
22
|
+
|
|
23
|
+
[](https://www.youtube.com/watch?v=o5ipQe2rVKQ)
|
|
24
|
+
|
|
25
|
+
**Another demonstration fixing `NaN` bugs in the PlayCanvas Volumetric Video project:**
|
|
26
|
+
|
|
27
|
+
https://www.youtube.com/watch?v=KdkTLjyoSeg
|
|
28
|
+
|
|
29
|
+
[](https://www.youtube.com/watch?v=KdkTLjyoSeg)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
npm install runtime-type-inspector
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Live demo: https://jsdoc.killtube.org/
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "runtime-type-inspector",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Validating JSDoc types at runtime for high-quality types - Trust is good, control is better.",
|
|
5
|
+
"main": "src/index.mjs",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/kungfooman/RuntimeTypeInspector.js.git"
|
|
12
|
+
},
|
|
13
|
+
"author": "Hermann Rolfes (kungfooman)",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/kungfooman/RuntimeTypeInspector.js/issues"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/kungfooman/RuntimeTypeInspector.js#readme"
|
|
19
|
+
}
|
package/src/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.warn("RuntimeTypeValidator.js received no funding yet.");
|