@lourd/load-script
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

@lourd/load-script npm package badge Build status

This single-function JavaScript module is a simple, no-frills way to add script tags to a browser document asynchronously.

Installation

npm

yarn install @lourd/load-script

In the browser

Available as a simple <script> through unpkg.com. The function will be available as the global variable loadScript.

API

loadScript(url: String) : Promise<void>

Support

Bring your own Promise polyfill if you need to support browsers that do not have a native Promise implementation.

Does not support Internet Explorer.

Package Sidebar

Install

npm i @lourd/load-script

Weekly Downloads

50

Version

0.1.4

License

MIT

Unpacked Size

5.03 kB

Total Files

7

Last publish

Collaborators

  • lourd