Nonsense Poetry Manager

    promise-create-script

    2.0.2 • Public • Published

    promise-create-script

    Creates script and returns a promise.

    Build Status npm version js-standard-style

    Installing with npm

    npm i --save promise-create-script

    Usage

    const createScript = require('promise-create-script')
    const uri = 'http://code.jquery.com/jquery-3.2.1.slim.min.js'
    createScript(document.body, uri).then(script => {
        // This returns the script tag
        console.log(script.src)
    }).catch(err => {
        // Oops, some ting wong
        console.error(err)
    })

    License

    MIT

    Install

    npm i promise-create-script

    DownloadsWeekly Downloads

    15

    Version

    2.0.2

    License

    MIT

    Last publish

    Collaborators

    • kahwee