Socket
Book a DemoInstallSign in
Socket

async-script-promise

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-script-promise

asynchronously load scripts, returns a promise

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

async-script-promise

asynchronously load scripts.

Returns a promise, so you can kick it off as soon as your script loads, but wait to use it until it's actually loaded.

Install

npm install async-script-promise

Use

it('should load stripe', async () => {
  // start loading...
  let p = load('https://checkout.stripe.com/v3/checkout.js')

  // ensure that it's finished before using it
  await p
  assert.ok(window.StripeCheckout.configure)
})

License

MIT

Keywords

async

FAQs

Package last updated on 19 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts