getscript-promise

0.0.1 • Public • Published

getscript-promise

A Javascript Promise based library for fetching scripts asynchronously. To be used in client applications.

Using the Project

  • npm install getscript-promise
  • var getScript = require('getscript-promise')

GetScript

getScript returns a Promise

  • getScript(<script address>)
  • returns a promise and appends script to document.

Example using await/async

  • await getScript('//www.googletagservices.com/tag/js/gpt.js')

Package Sidebar

Install

npm i getscript-promise

Weekly Downloads

95

Version

0.0.1

License

MIT

Last publish

Collaborators

  • magicgrl111