-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Globals to add #2
Comments
Does |
That’s already a language builtin; what needs to be added? |
setTimeout |
The full range of global timer functions in Node.js:
There are also |
Also Node.js implements parts of the Performance Timing API but it's still experimental and I don't recall plans to make it a global. It is intentionally different from the browser in some cases (e.g. nodejs/node#19563) |
BTW this script can be used to find Node.js-specific globals: 'use strict';
const vm = require('vm');
const globalsFromVM = JSON.parse(
JSON.stringify(
vm.runInNewContext('Reflect.ownKeys(globalThis)')
)
);
const globalsFromNode = [];
for (const key of Reflect.ownKeys(globalThis)) {
if (!globalsFromVM.includes(key)) {
globalsFromNode.push(key);
}
}
console.log(globalsFromNode.map(key => String(key)).join('\n')) |
List of globals to add:
console
(Add URLSearchParams and Console API #7)crypto
URL
URLSearchParams
(Add URLSearchParams and Console API #7)The text was updated successfully, but these errors were encountered: