# promise-script-loader

> A promise-based asynchronous script loader.

Latest version **0.1.3** (published 2017-02-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install promise-script-loader
pnpm add promise-script-loader
yarn add promise-script-loader
bun add promise-script-loader
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2017-02-01 |
| First published | 2016-07-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Alex Wilson |
| Maintainers | axgy |
| Keywords | promise, import, ajax, resource, script, browser, asynchronous |

## Links

- npm: https://www.npmjs.com/package/promise-script-loader
- Repository: https://github.com/antoligy/promise-loaders
- Homepage: https://github.com/antoligy/promise-loaders#readme
- Issues: https://github.com/antoligy/promise-loaders/issues
- npm.io page: https://npm.io/package/promise-script-loader

## Alternatives

- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads
- [fa](https://npm.io/package/fa.md) — 185 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2017-02-01
- 0.1.2 — 2016-07-13
- 0.1.1 — 2016-07-13
- 0.1.0 — 2016-07-13

## README

# promise-script-loader #
## Simple promise-based script loader. ##

Promise-script-loader is a tool designed to allow for easy asynchronous script-loading, for cases where one must ensure the execution order of scripts without allowing them to be blocking.

```
  import promiseScriptLoader from 'promise-script-loader';
  promiseScriptLoader('/my-script.js')
    .then(() => promiseScriptLoader('https://example.org/dependent-script.js'))
    .then(() => console.log('success!'))
    .catch(console.error);
```



## Installation ##

### npm ###
`$ npm install --save promise-script-loader`


## Polyfilling ##
This depends on Promises, which are not supported by older browsers.  To get around this, I recommend using [Polyfill.io](https://polyfill.io/v2/docs/features/#Promise) which will target only the browsers that need polyfilling.

---
_Source: https://npm.io/package/promise-script-loader · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
