{"id":47621,"library":"fetch-multiple","title":"fetch-multiple","description":"A lightweight utility (v1.2.3) for fetching multiple resources in a single Promise. Works with any fetch-compatible client, returns parsed responses keyed by URL. Last updated 2016; low activity. Key differentiator: simple API over ad-hoc Promise.all patterns.","status":"maintenance","version":"1.2.3","language":"javascript","source_language":"en","source_url":"https://github.com/seancrater/fetch-multiple","tags":["javascript","fetch","promise","multiple","requests","multi"],"install":[{"cmd":"npm install fetch-multiple","lang":"bash","label":"npm"},{"cmd":"yarn add fetch-multiple","lang":"bash","label":"yarn"},{"cmd":"pnpm add fetch-multiple","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default export only; named import will fail.","wrong":"import { fetchMultiple } from 'fetch-multiple'","symbol":"default","correct":"import fetchMultiple from 'fetch-multiple'"},{"note":"CJS require returns the function directly.","wrong":"const { fetchMultiple } = require('fetch-multiple')","symbol":"default","correct":"const fetchMultiple = require('fetch-multiple')"},{"note":"Unnecessary; default import works directly.","wrong":"import { default as fetchMultiple } from 'fetch-multiple'","symbol":"default","correct":"import fetchMultiple from 'fetch-multiple'"}],"quickstart":{"code":"import fetchMultiple from 'fetch-multiple';\n\nconst fetchables = {\n  'https://api.example.com/users': 'json',\n  'https://api.example.com/text': 'text'\n};\n\nfetchMultiple(fetchables)\n  .then(data => {\n    console.log(data);\n  })\n  .catch(err => console.error(err));","lang":"javascript","description":"Demonstrates basic usage: fetch two endpoints with different parse methods."},"warnings":[{"fix":"Access results with bracket notation using the original URL string.","message":"The library returns a plain object, not a Map. Keys are the URL strings exactly as provided.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Do not rely on key format; check documentation before upgrading.","message":"In future releases, the returned object keys may change from URL strings to paths or hashes.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Replace with native Promise.all or a modern alternative like p-map.","message":"The library is no longer actively maintained; use Promise.all() with fetch() instead.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'2016':31 'activ':33 'ad':40 'ad-hoc':39 'api':37 'client':22 'compat':21 'differenti':35 'fetch':2,9,20,45 'fetch-compat':19 'fetch-multipl':1 'hoc':41 'javascript':44 'key':26,34 'last':29 'lightweight':5 'low':32 'multi':49 'multipl':3,10,47 'pars':24 'pattern':43 'promis':15,46 'promise.all':42 'request':48 'resourc':11 'respons':25 'return':23 'simpl':36 'singl':14 'updat':30 'url':28 'util':6 'v1.2.3':7 'work':16","created_at":"2026-06-07T16:52:27.380475+00:00","updated_at":"2026-06-07T16:52:27.380475+00:00","problems":[{"fix":"Use const fetchMultiple = require('fetch-multiple') without destructuring.","cause":"CommonJS require with destructuring: const { fetchMultiple } = require('fetch-multiple')","error":"TypeError: fetchMultiple is not a function"},{"fix":"Use require() in Node.js or configure Babel/webpack for ES modules.","cause":"Using ES import syntax in a CommonJS environment without transpilation","error":"SyntaxError: Unexpected token import"},{"fix":"Ensure all URLs are correct and server allows cross-origin requests.","cause":"One or more URLs are invalid or CORS blocked","error":"Uncaught (in promise) TypeError: Failed to fetch"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/seancrater/fetch-multiple#readme","github":"https://github.com/seancrater/fetch-multiple","docs":null,"changelog":null,"pypi":null,"npm":"fetch-multiple","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}