web-features 2.49.0-dev-20250917152108-acd4cf1 → 2.49.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/README.md +0 -75
- package/data.json +1 -1
- package/data.schema.json +290 -220
- package/index.d.ts +91 -6
- package/package.json +2 -4
- package/types.d.ts +0 -26
- package/types.quicktype.d.ts +0 -217
package/README.md
CHANGED
|
@@ -52,78 +52,3 @@ For browser support iconography (that is, browser logos and checkmarks and Xs),
|
|
|
52
52
|
If you wish to report browser version numbers, avoid showing version numbers alone.
|
|
53
53
|
Developers and users often do not know whether a version number refers to a very recent or old release.
|
|
54
54
|
If you must show a version number, consider contextualizing that number by showing a release date, a relative date (such as "Released … years ago"), an offset (such as "… releases ago"), or usage statistics relevant to your audience (such as "…% of your visitors in the last 90 days").
|
|
55
|
-
|
|
56
|
-
## Schema reference
|
|
57
|
-
|
|
58
|
-
This part of the README summarizes the schema for feature data.
|
|
59
|
-
See `data.schema.json` for a canonical reference.
|
|
60
|
-
|
|
61
|
-
## `features`
|
|
62
|
-
|
|
63
|
-
The `features` object contains data for features.
|
|
64
|
-
Each key is a feature ID string and values describe the feature.
|
|
65
|
-
Most values are ordinary feature objects with names, descriptions, and other data.
|
|
66
|
-
Some features contain redirects to other features.
|
|
67
|
-
You can distinguish between ordinary feature objects and redirects by using the `kind` property:
|
|
68
|
-
|
|
69
|
-
* `"feature"` — ordinary features
|
|
70
|
-
* `"moved"` — the feature has a redirect to a new key
|
|
71
|
-
* `"split"` — the feature has a redirect to two or more keys
|
|
72
|
-
|
|
73
|
-
### Feature objects
|
|
74
|
-
|
|
75
|
-
A feature with the `kind` set to `"feature"` is an ordinary feature.
|
|
76
|
-
It has the following properties:
|
|
77
|
-
|
|
78
|
-
- `kind` (value: `"feature"`): A type discriminator
|
|
79
|
-
- `name` (type: `string`): A plain-text human-readable name for the feature
|
|
80
|
-
- `description` (type: `string`): A short plain-text description of the feature
|
|
81
|
-
- `description_html` (type: `string`): A short HTML-formatted description of the feature
|
|
82
|
-
- `spec` (type: `string[]`): A specification URL or an array of them
|
|
83
|
-
- `status`: Support status data.
|
|
84
|
-
It has the following properties:
|
|
85
|
-
|
|
86
|
-
- `baseline` (type: `"high" | "low" | false`): Whether the feature Baseline widely available, Baseline newly available, or not Baseline
|
|
87
|
-
- `baseline_low_date` (optional, type: `string`): When the feature reached Baseline newly available status
|
|
88
|
-
- `baseline_high_date` (optional, type: `string`): When the feature reached Baseline widely available status
|
|
89
|
-
- `support`: An object representing per-browser support information, showing the version number where each browser first started to support that feature.
|
|
90
|
-
All keys are optional.
|
|
91
|
-
Keys are one of: `"chrome"`, `"chrome_android"`, `"edge"`, `"firefox"`, `"firefox"`, `"firefox_android"`, `"safari"`, `"safari_ios"`.
|
|
92
|
-
Each value is a `string` containing the version number.
|
|
93
|
-
|
|
94
|
-
- `group` (optional, type: `string[]`): A `groups` key or an array of them
|
|
95
|
-
- `snapshot` (optional, type: `string[]`): A `snapshots` key or an array of them
|
|
96
|
-
- `caniuse` (optional, type: `string[]`): A caniuse feature ID that corresponds to the current feature, or an array of them.
|
|
97
|
-
Use it to look up caniuse data from a package like [`caniuse-lite`](https://www.npmjs.com/package/caniuse-lite) or construct a URL to a page on caniuse.com.
|
|
98
|
-
- `compat_features` (optional, type: `string[]`): An array of `@mdn/browser-compat-data` feature key strings.
|
|
99
|
-
- `discouraged` (optional): An object indicating that web developers should avoid using the feature.
|
|
100
|
-
It has the following properties:
|
|
101
|
-
|
|
102
|
-
- `according_to` (type: `string[]`): One or more links to a formal discouragement notice, such as specification text or an intent-to-unship
|
|
103
|
-
- `alternatives` (optional, type: `string[]`): One or more feature IDs (as in `features[alternatives[0]]`) that substitute some or all of this feature's utility
|
|
104
|
-
|
|
105
|
-
### Moved objects
|
|
106
|
-
|
|
107
|
-
A feature with the `kind` set to `"moved"` is a redirect to another feature.
|
|
108
|
-
It says that this feature ID is actually best represented by the data given by another ID.
|
|
109
|
-
If you’re showing web-features data to developers, then treat this like an HTTP 301 redirect and go directly to the feature it points to.
|
|
110
|
-
|
|
111
|
-
A moved feature has the following properties:
|
|
112
|
-
|
|
113
|
-
- `kind` (value: `"moved"`): A type discriminator
|
|
114
|
-
- `redirect_target` (type: `string`): The ID of a feature (as in `features[redirect_target]`).
|
|
115
|
-
The ID is guaranteed to be an ordinary, non-redirecting feature.
|
|
116
|
-
Double redirects and cycles are forbidden.
|
|
117
|
-
|
|
118
|
-
### Split objects
|
|
119
|
-
|
|
120
|
-
A feature with the `kind` set to `"split"` is a redirect to multiple other features.
|
|
121
|
-
It says that this feature ID is actually best represented by the data given by multiple other features and you (or your users) will have to make a choice about what to do.
|
|
122
|
-
You can think of this kind of feature like a [Wikipedia disambiguation page](https://en.wikipedia.org/wiki/Joker).
|
|
123
|
-
|
|
124
|
-
A split feature has the following properties:
|
|
125
|
-
|
|
126
|
-
- `kind` (value: `"split"`): A type discriminator
|
|
127
|
-
- `redirect_targets` (type: `string[]`): An array of two or more feature IDs, in order of greatest relevance or importance (as judged by the web-features maintainers).
|
|
128
|
-
The IDs are guaranteed to be ordinary, non-redirecting features.
|
|
129
|
-
Double redirects and cycles are forbidden.
|