deno-doc-wasm 0.0.1 → 0.1.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 ADDED
@@ -0,0 +1,45 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ocavue
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.
22
+
23
+ ---
24
+
25
+ MIT License
26
+
27
+ Copyright (c) 2018-2024 the Deno authors
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining a copy
30
+ of this software and associated documentation files (the "Software"), to deal
31
+ in the Software without restriction, including without limitation the rights
32
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
+ copies of the Software, and to permit persons to whom the Software is
34
+ furnished to do so, subject to the following conditions:
35
+
36
+ The above copyright notice and this permission notice shall be included in all
37
+ copies or substantial portions of the Software.
38
+
39
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # deno-doc-wasm
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/deno-doc-wasm?color=a1b858&label=)](https://www.npmjs.com/package/deno-doc-wasm)
4
+
5
+ Documentation generator for Node.js and Bun.
6
+
7
+ - **[`deno_doc`](https://github.com/denoland/deno_doc)** is a **Rust** crate that generates documentation for JavaScript and TypeScript modules.
8
+ - **[`@deno/doc`](https://github.com/denoland/deno_doc/tree/main/js)** is a compiled WebAssembly version of the Rust crate for **Deno**, published to [jsr.io](https://jsr.io).
9
+ - **[`deno-doc-wasm`](https://github)** (this project) is a re-distribution of the `jsr:@deno/doc` package so that it can work in **Node.js** and **Bun** as well, published to [npm](https://www.npmjs.com/package/deno-doc-wasm).
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install deno-doc-wasm
15
+ ```
16
+
17
+ ## Usage
18
+
19
+ The `doc()` function takes an array of string URL module specifiers and
20
+ potentially some options, and asynchronously resolves with a record of
21
+ documentation nodes keyed by the module URL, which represent the surface API of
22
+ the module.
23
+
24
+ A minimal example of using `doc()` and printing out some information about a
25
+ function:
26
+
27
+ ```ts
28
+ import { doc } from 'deno-doc-wasm'
29
+
30
+ const records = await doc(['https://deno.land/std/fmt/colors.ts'])
31
+ const colorsDoc = records['https://deno.land/std/fmt/colors.ts']
32
+
33
+ for (const node of colorsDoc) {
34
+ console.log(`name: ${node.name} kind: ${node.kind}`)
35
+ }
36
+ ```
37
+
38
+ ## API reference
39
+
40
+ Please refer to the documentation for the original [`@deno/doc`](https://jsr.io/@deno/doc/doc) package.
41
+
42
+ ## Credits
43
+
44
+ - This project would not be possible without the excellent work by the [Deno](https://deno.com/) team. The [`deno_doc`](https://github.com/denoland/deno_doc) crate is a well-designed and powerful documentation generator.
45
+ - Inspired by [@devdumpling](https://github.com/devdumpling)'s [work](https://github.com/npmx-dev/npmx.dev/pull/135) on integrating `@deno/doc` for [npmx.dev](https://npmx.dev).
46
+
47
+ ## License
48
+
49
+ MIT