Socket
Socket
Sign inDemoInstall

browser-script-loader

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0 to 3.0.1

4

package.json
{
"name": "browser-script-loader",
"version": "3.0.0",
"version": "3.0.1",
"description": "a simple & lightweight script loader,provide sync & async way to load script",

@@ -16,3 +16,3 @@ "main": "script-loader.js",

},
"author": "Kuitos",
"author": "Kuitos Lau",
"license": "MIT",

@@ -19,0 +19,0 @@ "bugs": {

# script-loader
脚本加载器,包括同步、异步、延时等方式,支持promise
* script-loader 最原始版本loader
* script-loader loader,无其他依赖
* script-loader-promise 基于es6 Promise的promise loader
* script-loader-angular 基于angular $q的promise loader
```js
ScriptLoader.loadAsync('index1.js', 'index2.js', function(){
console.log('loaded');
});
```

@@ -115,3 +115,4 @@ /**

return Promise.all(promises).then(loadedCallback || function noop() {});
return Promise.all(promises).then(loadedCallback || function noop() {
});

@@ -132,3 +133,3 @@ },

window.setTimeout(function () {
resolve(ScriptLoader.loadScriptsAsync.apply(args));
resolve(ScriptLoader.loadScriptsAsync.apply(ScriptLoader, args));
}, 500);

@@ -135,0 +136,0 @@ });

@@ -115,3 +115,4 @@ /**

scriptDom = creteScriptDom(scriptSrc);
addCallbackWhenScriptLoaded(scriptDom, loadedCallback || function noop() {});
addCallbackWhenScriptLoaded(scriptDom, loadedCallback || function noop() {
});
headEl.appendChild(scriptDom);

@@ -161,3 +162,3 @@

window.setTimeout(function () {
ScriptLoader.loadScriptsAsync.apply(args);
ScriptLoader.loadScriptsAsync.apply(ScriptLoader, args);
}, 500);

@@ -164,0 +165,0 @@ }

Sorry, the diff of this file is not supported yet

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