# @wonkytech/tm-script-loader

> Javascript module for programmatically loading scripts.

Latest version **0.1.3** (published 2020-02-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @wonkytech/tm-script-loader
pnpm add @wonkytech/tm-script-loader
yarn add @wonkytech/tm-script-loader
bun add @wonkytech/tm-script-loader
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-02-07 |
| First published | 2019-11-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 53.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | tmcmaster |

## Links

- npm: https://www.npmjs.com/package/@wonkytech/tm-script-loader
- Repository: https://github.com/tmcmaster/tm-script-loader
- Homepage: https://tmcmaster.github.io/tm-script-loader
- Issues: https://github.com/tmcmaster/tm-script-loader/issues
- npm.io page: https://npm.io/package/@wonkytech/tm-script-loader

## Dependencies (1)

- [lit-html](https://npm.io/package/lit-html.md) ^1.0.0

## Recent versions

- 0.1.3 (latest) — 2020-02-07
- 0.1.2 — 2020-01-30
- 0.1.1 — 2020-01-22
- 0.1.0 — 2019-12-20
- 0.0.6 — 2019-12-19
- 0.0.5 — 2019-11-16
- 0.0.4 — 2019-11-15
- 0.0.3 — 2019-11-14
- 0.0.2 — 2019-11-14

## README

# tm-script-loader

Javascript module for programmatically loading scripts.

## Installation
```bash
npm i @wonkytech/tm-script-loader
```

## Usage
```javascript

import {
    loadLink,
    loadScripts, loadModule,
    loadFirebaseCDN, loadTokBoxCDN, 
} from "@wonkytech/tm-script-loader";

loadLink('test.css');

loadScripts({
    load: [
        'test1.js',
        'test2.js'
    ], then: {
        load: [
            'test3.js'
        ]
    }, payload: () => {return [window.testOne, window.testTwo, window.testThree]}
}).then(([test1,test2,test3]) => {
    console.log('Test1: ', test1);
    console.log('Test2: ', test2);
    console.log('Test3: ', test3);
});

loadFirebaseCDN().then((firebase) => {
    console.log('Firebase has finished loading.', firebase);
});

loadTokBoxCDN().then((tokbox) => {
    console.log('TokBox has finished loading.', tokbox);
});

loadModule('@wonkytech/tm-script-loader', ['loadLink']).then(([loadLink]) => {
    console.log('LoadLink', loadLink);
});
```

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