import-scripts
v1.0.0
Published
`importScripts()` from the Web APIs for Service Workers and Web Workers
Downloads
203
Maintainers
Readme
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
- https://github.com/JamesJansson/importScripts
Colophon
Made by Sebastiaan Deckers in Singapore 🇸🇬