Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-load-script

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-load-script

Very simple promise based script and JSONP

  • 0.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.6K
increased by133.74%
Maintainers
1
Weekly downloads
 
Created
Source

simple-load-script

Very simple promise based script loader and JSONP

  • tiny, only 531 bytes (minified and gzipped)
  • Promise based (use polyfill if you need)
  • uses addEventListener (IE9+)

Installation

npm install --save simple-load-script

UMD (CommonJS, AMD, global, ES6)

CommonJS

var loadScript = require('simple-load-script');

loadScript(/**/);

AMD

define(['simple-load-script'], function(loadScript) {
  loadScript(/**/);
});

Global (in window object)

simpleLoadScript(/**/);

ES6 (ES2015) modules

  • loading ES5 module
import loadScript from 'simple-load-script';

loadScript(/**/);

Usage

!!! WORK IN PROGRESS !!!

Promise polyfill

Good example

npm install es6-promise --save

es6 (es2015) version (non-UMD)

simple-load-script/modern.js

Changelog

View on github.

Keywords

FAQs

Package last updated on 09 Apr 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc