-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathhtml-vs-wc.js
More file actions
28 lines (20 loc) · 841 Bytes
/
html-vs-wc.js
File metadata and controls
28 lines (20 loc) · 841 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import bcdf from './data/bcdf.json' with { type: 'json' };
import { features } from "web-features";
import getKeysInGroup from './getKeysInGroup.js';
import groupKeysByEarliestReleaseYear from './groupKeysByEarliestReleaseYear.js';
/*
const groupKey = 'web-components';
out = getKeysInGroup(groupKey);
//const sortedKeys = keys.map(key => key.key).sort();
//console.log(`Keys in group "${groupKey}":`, sortedKeys);
out = groupKeysByEarliestReleaseYear(out);
*/
let out = bcdf;
console.log(`Total keys: ${out.length}`);
out = bcdf.filter(k => k.key.startsWith('html.'));
console.log(`Keys starting with "html.": ${out.length}`);
out = groupKeysByEarliestReleaseYear(out);
console.log(`Keys starting with "html." grouped by earliest release year: ${out.length}`);
out.forEach(([year, count]) => {
console.log(`${year},${count}`);
})