Skip to content

Commit

Permalink
Drop the builtin category and move the missing variables to appropria…
Browse files Browse the repository at this point in the history
…te es* categories (sindresorhus#140)
  • Loading branch information
Standard8 committed Dec 4, 2019
1 parent fee6997 commit 101ab8d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 68 deletions.
2 changes: 1 addition & 1 deletion get-browser-globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ copy(JSON.stringify(ret, null, '\t'));
/*
Usage:
Open an Incognito window in Chrome Canary and paste the above into the console. You'll now have a new object in your clipboard for the `browser` field in `globals.json`. You still need to manually filter out items from the `builtin` list.
Open an Incognito window in Chrome Canary and paste the above into the console. You'll now have a new object in your clipboard for the `browser` field in `globals.json`. You still need to manually filter out items from the `es*` lists.
*/
69 changes: 4 additions & 65 deletions globals.json
Original file line number Diff line number Diff line change
@@ -1,69 +1,4 @@
{
"builtin": {
"Array": false,
"ArrayBuffer": false,
"Atomics": false,
"BigInt": false,
"BigInt64Array": false,
"BigUint64Array": false,
"Boolean": false,
"constructor": false,
"DataView": false,
"Date": false,
"decodeURI": false,
"decodeURIComponent": false,
"encodeURI": false,
"encodeURIComponent": false,
"Error": false,
"escape": false,
"eval": false,
"EvalError": false,
"Float32Array": false,
"Float64Array": false,
"Function": false,
"globalThis": false,
"hasOwnProperty": false,
"Infinity": false,
"Int16Array": false,
"Int32Array": false,
"Int8Array": false,
"isFinite": false,
"isNaN": false,
"isPrototypeOf": false,
"JSON": false,
"Map": false,
"Math": false,
"NaN": false,
"Number": false,
"Object": false,
"parseFloat": false,
"parseInt": false,
"Promise": false,
"propertyIsEnumerable": false,
"Proxy": false,
"RangeError": false,
"ReferenceError": false,
"Reflect": false,
"RegExp": false,
"Set": false,
"SharedArrayBuffer": false,
"String": false,
"Symbol": false,
"SyntaxError": false,
"toLocaleString": false,
"toString": false,
"TypeError": false,
"Uint16Array": false,
"Uint32Array": false,
"Uint8Array": false,
"Uint8ClampedArray": false,
"undefined": false,
"unescape": false,
"URIError": false,
"valueOf": false,
"WeakMap": false,
"WeakSet": false
},
"es5": {
"Array": false,
"Boolean": false,
Expand Down Expand Up @@ -167,6 +102,9 @@
"Array": false,
"ArrayBuffer": false,
"Atomics": false,
"BigInt": false,
"BigInt64Array": false,
"BigUint64Array": false,
"Boolean": false,
"constructor": false,
"DataView": false,
Expand All @@ -182,6 +120,7 @@
"Float32Array": false,
"Float64Array": false,
"Function": false,
"globalThis": false,
"hasOwnProperty": false,
"Infinity": false,
"Int16Array": false,
Expand Down
4 changes: 2 additions & 2 deletions index.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import {ReadonlyDeep} from 'type-fest';
import globals = require('.');

expectType<ReadonlyDeep<{[key: string]: {[key: string]: boolean}}>>(globals);
expectType<boolean>(globals.builtin.Array);
expectError((globals.builtin.Array = true));
expectType<boolean>(globals.es5.Array);
expectError((globals.es5.Array = true));

0 comments on commit 101ab8d

Please sign in to comment.