@@ -25,11 +25,11 @@ blog posts, notes, and images).
25
25
26
26
Just using either RSS or Atom is probably fine: no need to do both.
27
27
28
- Note that this package is ESM only: Node 12+ is required to use it and it must
29
- be imported instead of required.
30
-
31
28
## Install
32
29
30
+ This package is [ ESM only] ( https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c ) :
31
+ Node 12+ is needed to use it and it must be ` import ` ed instead of ` require ` d.
32
+
33
33
[ npm] [ ] :
34
34
35
35
``` sh
@@ -38,7 +38,7 @@ npm install xast-util-feed
38
38
39
39
## Use
40
40
41
- Say we have the following module, ` example.mjs `
41
+ Say we have the following module, ` example.js `
42
42
43
43
``` js
44
44
import {atom , rss } from ' xast-util-feed'
@@ -68,7 +68,7 @@ console.log(toXml(rss(channel, data)))
68
68
console .log (toXml (atom (channel, data)))
69
69
```
70
70
71
- Now, running ` node example.mjs ` yields (pretty printed):
71
+ Now, running ` node example.js ` yields (pretty printed):
72
72
73
73
``` xml
74
74
<?xml version =" 1.0" encoding =" utf-8" ?>
@@ -131,6 +131,9 @@ Now, running `node example.mjs` yields (pretty printed):
131
131
132
132
## API
133
133
134
+ This package exports the following identifiers: ` atom ` , ` rss ` .
135
+ There is no default export.
136
+
134
137
### ` rss(channel, data) `
135
138
136
139
Build an RSS feed.
0 commit comments