Socket
Socket
Sign inDemoInstall

tiny-script-loader

Package Overview
Dependencies
0
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tiny-script-loader

Tiny script loader


Version published
Weekly downloads
227
decreased by-3.81%
Maintainers
2
Created
Weekly downloads
 

Readme

Source

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

FAQs

Last updated on 17 May 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc