web-features 0.9.0 → 0.10.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 +1 -1
- package/index.d.ts +24 -9
- package/index.js +2 -2
- package/index.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/** Web platform feature */
|
|
2
1
|
interface FeatureData {
|
|
3
2
|
/** Short name */
|
|
4
3
|
name: string;
|
|
@@ -10,14 +9,16 @@ interface FeatureData {
|
|
|
10
9
|
alias?: string | [string, string, ...string[]];
|
|
11
10
|
/** Specification */
|
|
12
11
|
spec: specification_url | [specification_url, specification_url, ...specification_url[]];
|
|
12
|
+
/** Group identifier */
|
|
13
|
+
group?: string | [string, string, ...string[]];
|
|
14
|
+
/** Snapshot identifier */
|
|
15
|
+
snapshot?: string | [string, string, ...string[]];
|
|
13
16
|
/** caniuse.com identifier */
|
|
14
17
|
caniuse?: string | [string, string, ...string[]];
|
|
15
18
|
/** Whether a feature is considered a "baseline" web platform feature and when it achieved that status */
|
|
16
19
|
status: SupportStatus;
|
|
17
20
|
/** Sources of support data for this feature */
|
|
18
21
|
compat_features?: string[];
|
|
19
|
-
/** Usage stats */
|
|
20
|
-
usage_stats?: usage_stats_url | [usage_stats_url, usage_stats_url, ...usage_stats_url[]];
|
|
21
22
|
}
|
|
22
23
|
type browserIdentifier = "chrome" | "chrome_android" | "edge" | "firefox" | "firefox_android" | "safari" | "safari_ios";
|
|
23
24
|
type BaselineHighLow = "high" | "low";
|
|
@@ -37,13 +38,27 @@ interface SupportStatus {
|
|
|
37
38
|
* @format uri
|
|
38
39
|
*/
|
|
39
40
|
type specification_url = string;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
interface GroupData {
|
|
42
|
+
/** Short name */
|
|
43
|
+
name: string;
|
|
44
|
+
/** Identifier of parent group */
|
|
45
|
+
parent?: string;
|
|
46
|
+
}
|
|
47
|
+
interface SnapshotData {
|
|
48
|
+
/** Short name */
|
|
49
|
+
name: string;
|
|
50
|
+
/** Specification */
|
|
51
|
+
spec: specification_url;
|
|
52
|
+
}
|
|
44
53
|
|
|
45
54
|
declare const features: {
|
|
46
|
-
[
|
|
55
|
+
[key: string]: FeatureData;
|
|
56
|
+
};
|
|
57
|
+
declare const groups: {
|
|
58
|
+
[key: string]: GroupData;
|
|
59
|
+
};
|
|
60
|
+
declare const snapshots: {
|
|
61
|
+
[key: string]: SnapshotData;
|
|
47
62
|
};
|
|
48
63
|
|
|
49
|
-
export { features
|
|
64
|
+
export { features, groups, snapshots };
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
const jsonPath = fileURLToPath(new URL("./index.json", import.meta.url));
|
|
4
|
-
const features = JSON.parse(readFileSync(jsonPath, { encoding: "utf-8" }));
|
|
5
|
-
export
|
|
4
|
+
const { features, groups, snapshots } = JSON.parse(readFileSync(jsonPath, { encoding: "utf-8" }));
|
|
5
|
+
export { features, groups, snapshots };
|