1.0.0 • Published 7 years ago

import-scripts v1.0.0

Weekly downloads
29
License
ISC
Repository
gitlab
Last release
7 years ago

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 🇸🇬

1.0.0

7 years ago