A Javascript Promise based library for fetching scripts asynchronously. To be used in client applications.
npm install getscript-promise
var getScript = require('getscript-promise')
getScript returns a Promise
getScript(<script address>)
- returns a promise and appends script to document.
await getScript('//www.googletagservices.com/tag/js/gpt.js')