async-preloader
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -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.| |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8634289