Nylon Pendulum Movement

    tiny-script-loader
    TypeScript icon, indicating that this package has built-in type declarations

    2.2.1 • Public • Published

    Tiny Script Loader Build Status NPM version js-standard-style

    The purpose of this library is to be the smallest callback & Promise -based script loader.

    Usage

    Callback

    var loadScript = require('tiny-script-loader/loadScript')
     
    loadScript('https://example.com/script.js', function () {
      console.log('loaded')
    })

    Promise

    var loadScript = require('tiny-script-loader/loadScriptPromised')
     
    loadScript('https://example.com/script.js')
    .then(function () {
      console.log('loaded')
    })

    Additional attributes

    var loadScript = require('tiny-script-loader/loadScript')
    var loadScriptPromised = require('tiny-script-loader/loadScriptPromised')
     
    loadScript('https://example.com/script.js', callbackFn, { crossOrigin: true })
    loadScriptPromised('https://example.com/script.js', { type: 'javascript' })
      .then(fn)

    License

    Apache-2.0

    Keywords

    Install

    npm i tiny-script-loader

    DownloadsWeekly Downloads

    479

    Version

    2.2.1

    License

    Apache-2.0

    Unpacked Size

    18.4 kB

    Total Files

    11

    Last publish

    Collaborators

    • calling
    • nemtsov