Socket
Socket
Sign inDemoInstall

resource-loader

Package Overview
Dependencies
2
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.3 to 1.1.4

2

package.json
{
"name": "resource-loader",
"version": "1.1.3",
"version": "1.1.4",
"main": "./src/index.js",

@@ -5,0 +5,0 @@ "description": "A generic asset loader, made with web games in mind.",

@@ -13,3 +13,3 @@ # Resource Loader [![Build Status](https://travis-ci.org/englercj/resource-loader.svg?branch=master)](https://travis-ci.org/englercj/resource-loader)

// chainable `add` to enqueue a resource
.add(url, options)
.add(name, url, options)

@@ -27,4 +27,5 @@ // chainable `before` to add a middleware that runs for each resource, *before* loading a resource.

// resources have loaded.
.load(function (resources) {
// resources is an array of resource objects that have a couple properties:
.load(function (loader, resources) {
// resources is an object where the key is the name of the resource loaded and the value is the resource object.
// They have a couple default properties:
// - `url`: The URL that the resource was loaded from

@@ -31,0 +32,0 @@ // - `error`: The error that happened when trying to load (if any)

@@ -273,2 +273,5 @@ var EventEmitter2 = require('eventemitter2').EventEmitter2,

// set the request type and url
xhr.open('GET', this.url, true);
// set the responseType

@@ -282,3 +285,2 @@ xhr.responseType = this.xhrType;

xhr.open('GET', this.url, true);
xhr.send();

@@ -285,0 +287,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc