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

async-preloader

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-preloader - npm Package Compare versions

Comparing version 2.0.0 to 2.1.0

2

lib/async-preloader.js

@@ -544,3 +544,3 @@ (function (global, factory) {

AsyncPreloader.items = new Map();
AsyncPreloader.LOADERS = new Map().set("Default", { extensions: ["txt"] }).set("Json", { extensions: ["json"] }).set("Image", { extensions: ["jpeg", "jpg", "gif", "png", "webp"] }).set("Video", { extensions: ["webm", "ogg", "mp4"] }).set("Audio", { extensions: ["webm", "ogg", "mp3"] }).set("Xml", { extensions: ["xml", "svg", "html"] }).set("Font", { extensions: ["woff2", "woff", "ttf", "otf", "eot"] });
AsyncPreloader.LOADERS = new Map().set("Default", { extensions: ["txt"] }).set("Json", { extensions: ["json"] }).set("Image", { extensions: ["jpeg", "jpg", "gif", "png", "webp"] }).set("Video", { extensions: ["webm", "ogg", "mp4"] }).set("Audio", { extensions: ["webm", "ogg", "mp3", "wav", "flac"] }).set("Xml", { extensions: ["xml", "svg", "html"] }).set("Font", { extensions: ["woff2", "woff", "ttf", "otf", "eot"] });

@@ -547,0 +547,0 @@ return AsyncPreloader;

@@ -538,4 +538,4 @@ import FontFaceObserver from 'fontfaceobserver';

AsyncPreloader.items = new Map();
AsyncPreloader.LOADERS = new Map().set("Default", { extensions: ["txt"] }).set("Json", { extensions: ["json"] }).set("Image", { extensions: ["jpeg", "jpg", "gif", "png", "webp"] }).set("Video", { extensions: ["webm", "ogg", "mp4"] }).set("Audio", { extensions: ["webm", "ogg", "mp3"] }).set("Xml", { extensions: ["xml", "svg", "html"] }).set("Font", { extensions: ["woff2", "woff", "ttf", "otf", "eot"] });
AsyncPreloader.LOADERS = new Map().set("Default", { extensions: ["txt"] }).set("Json", { extensions: ["json"] }).set("Image", { extensions: ["jpeg", "jpg", "gif", "png", "webp"] }).set("Video", { extensions: ["webm", "ogg", "mp4"] }).set("Audio", { extensions: ["webm", "ogg", "mp3", "wav", "flac"] }).set("Xml", { extensions: ["xml", "svg", "html"] }).set("Font", { extensions: ["woff2", "woff", "ttf", "otf", "eot"] });
export default AsyncPreloader;
{
"name": "async-preloader",
"version": "2.0.0",
"version": "2.1.0",
"description": "Assets preloader using ES2017 async/await and fetch.",

@@ -5,0 +5,0 @@ "main": "lib/async-preloader.js",

@@ -35,3 +35,3 @@ # async-preloader

|**src**|Input for the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)|
|**loader**|Optional _string_ from one of the [LOADERS Map](https://github.com/dmnsgn/async-preloader/blob/master/src/index.js#L20). It needs to be specified for Font and Audio (webm|off). Otherwise the loader is inferred from the file extension or default to `Response.text()` if there is no extension.|
|**loader**|Optional _string_ from one of the [LOADERS Map](https://github.com/dmnsgn/async-preloader/blob/master/src/index.js#L20). It needs to be specified for Font and Audio (webm,ogg). Otherwise the loader is inferred from the file extension or default to `Response.text()` if there is no extension.|
|**options**|Optional _object_ to pass to the [fetch method](https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch).|

@@ -38,0 +38,0 @@ |**body**|Optional _string_ to define the [Body method](https://developer.mozilla.org/en-US/docs/Web/API/Body) to handle the Response. Default to `blob()` for Image, Video and Audio.|

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