import-scripts

1.0.0 • Public • Published

importScripts

Node.js ponyfill of importScripts() from the Web APIs for Service Workers and Web Workers.

Usage

import importScripts from 'import-scripts'
 
importScripts('foo.js')
 
// foo.js:
// var bar = {lol: 123}
 
console.dir(bar)
// Result: {lol: 123}

Use Case

Useful when writing testing for code that runs in Service Workers.

References

See Also

Colophon

Made by Sebastiaan Deckers in Singapore 🇸🇬

Package Sidebar

Install

npm i import-scripts

Weekly Downloads

71

Version

1.0.0

License

ISC

Last publish

Collaborators

  • seb