1.4.1 • Published 2 years ago
nodejs-polyfill v1.4.1
Polyfill on Node.js
Polyfil your node.js environment with this as the window when launching your own code
node -r nodejs-polyfill app.jsWhat is polyfilled?
- usage of
windowin the code or libraries window.setTimeout- defaultsetTimeoutnode functionwindow.clearTimeout- defaultclearTimeoutnode functionwindow.WebSocket- version from global objectwindow.ArrayBuffer- version from global object onlywindow.addEventListener- empty void functionwindow.navigator-{ onLine: true }window.isNodeJS- to check if polyfills were apliedwindow.localStorage- in memory storagewindow.sessionStorage- in memory storagewindow.Date- version from global objectglobal.XMLHttpRequest- using xhr2global.WebSocket- using ws if the right flag is not set- if the above functions/properties are already set in the
globalobject then they will be taken into the account