Skip to content

Commit 6dbd6bb

Browse files
committed
Document Node.js-less web-features import
1 parent 09507c2 commit 6dbd6bb

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/web-features/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ npm install web-features
1212
import { features, groups, snapshots } from "web-features";
1313
```
1414

15+
Or, without Node.js:
16+
17+
```js
18+
import {
19+
features,
20+
groups,
21+
snapshots,
22+
} from "web-features/data.json" with { type: "json" };
23+
```
24+
1525
## Rendering Baseline statuses with `web-features`
1626

1727
If you're using `web-features` to render Baseline iconography or browser logos with support markers, then you must follow these procedures to ensure consistent usage.
@@ -29,3 +39,7 @@ For browser support iconography (that is, browser logos and checkmarks and Xs),
2939
1. If `status.baseline` is `"high"` or `"low"`, then show a green checkmark (✅, "supported") beside each browser's logo icon.
3040
1. If `status.baseline` is `false` and the browser's `status.support` key (for example, `status.support.edge`) is `undefined` or `false`, then show a gray X ("unsupported") beside the browser's logo icon.
3141
1. If `status.baseline` is `"high"` or `"low"` and the browser's `status.support` key is a string, then show a green checkmark ("supported") beside the browser's logo icon.
42+
43+
```
44+
45+
```

0 commit comments

Comments
 (0)