You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Cross-runtime support (Bun ‡, Deno, Node, and web browsers)
@@ -10,15 +12,11 @@ Fetch and parse XML documents using the power of JavaScript web streams and asyn
10
12
11
13
## Usage
12
14
13
-
Add dependency from JSR: [@dbushell/xml-streamify](https://jsr.io/@dbushell/xml-streamify). See the `examples` directory for platform specific examples.
14
-
15
-
```javascript
16
-
import {parse} from"jsr:@dbushell/xml-streamify";
17
-
```
18
-
19
15
The `parse` generator function is the main export. Below is a basic example that logs RSS item titles as they're found:
@@ -39,10 +37,10 @@ for await (const [type, value] of stream) {
39
37
}
40
38
```
41
39
42
-
See [`examples/advanced/stream.ts`](/examples/advanced/stream.ts) for a full example.
43
-
44
40
## Advanced
45
41
42
+
See the `examples` directory for more advanced and platform specific examples.
43
+
46
44
In the `examples/advanced` directory there is a Deno web server. It will proxy RSS feeds, add CORS headers, and throttle streaming speed for testing. Run `deno run -A examples/advanced/mod.ts` for the full example script.
47
45
48
46
## Notes
@@ -55,20 +53,6 @@ Browsers may need a [polyfill](https://bugs.chromium.org/p/chromium/issues/detai
55
53
56
54
‡ Bun has issues ([#2489](https://github.com/oven-sh/bun/issues/2489))
57
55
58
-
## NPM
59
-
60
-
Add the [JavaScript Registry](https://jsr.io/) to `.npmrc`:
0 commit comments