Registry / testing / fetch-loader

fetch-loader

JSON →
library1.0.60jsnpmunverified

A simple asset loader that fetches files (images, videos, sounds, JSON) as blobs and returns corresponding media elements. Version 1.0.60 is the latest. It provides event-based loading with parallel fetch limits and optional head requests for progression tracking. Differentiators: minimal API, no build tools required, works in browser via bundler.

npm install fetch-loader
INSTALL
IMPORT
SIG · FETCH-LOADER
F
fetch-loader
testingjavascriptv1.0.60
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

fetchLoader
import fetchLoader from 'fetch-loader'
const fetchLoader = require('fetch-loader').default
Default export is a class.
fetchLoader
const fetchLoader = require('fetch-loader')
CommonJS style without .default.

Shows basic usage: import, instantiate, add event listeners, and load files with options.

import fetchLoader from 'fetch-loader'; const manager = new fetchLoader(); const files = [ { name: 'image', url: 'https://example.com/image.jpg' }, { name: 'sound', url: 'https://example.com/sound.mp3' } ]; manager.on('file', (file) => console.log('Loaded', file.name)); manager.on('complete', () => console.log('All loaded')); manager.load(files, { parallel: 4, headreq: false });
Debug
Known issues
gotchaheadreq option may cause slower initial load due to HEAD requests.
fix
Set headreq to false if you don't need precise progress.
affects: *
gotchaCalling off() removes all listeners for that event; cannot remove specific callbacks.
fix
Use named functions and keep references if you need to remove specific listeners.
affects: *
Errors
Common errors & fixes
Cannot find module 'fetch-loader'
Missing npm install
fix
npm install --save fetch-loader
fetch is not defined
Running in environment without fetch API (e.g., Node <18)
fix
Install a fetch polyfill or upgrade Node
Upgrade
Version history
1.0.60latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
fetch-loader — npm install fetch-loader · libregistry