1.4.1 • Published 2 years ago

nodejs-polyfill v1.4.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Polyfill on Node.js

Polyfil your node.js environment with this as the window when launching your own code

node -r nodejs-polyfill app.js

What is polyfilled?

  • usage of window in the code or libraries
  • window.setTimeout - default setTimeout node function
  • window.clearTimeout - default clearTimeout node function
  • window.WebSocket - version from global object
  • window.ArrayBuffer - version from global object only
  • window.addEventListener - empty void function
  • window.navigator - { onLine: true }
  • window.isNodeJS - to check if polyfills were aplied
  • window.localStorage - in memory storage
  • window.sessionStorage - in memory storage
  • window.Date - version from global object
  • global.XMLHttpRequest - using xhr2
  • global.WebSocket - using ws if the right flag is not set
  • if the above functions/properties are already set in the global object then they will be taken into the account
1.2.0

2 years ago

1.1.0

2 years ago

1.4.1

2 years ago

1.3.2

2 years ago

1.4.0

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.0.0

2 years ago