Skip to content
JS
Package

xhr-mock

Utility for mocking XMLHttpRequest.

v2.5.1, 8 Nov 2019MITCommonJSTypes: BundledDev servers and API mockingTesting
$ npm install xhr-mock

Key numbers

As of 25 Sept 2026
Weekly downloads
161.6k
+29% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
2
Direct, from package.json
Last release
6 years ago
v2.5.1
GitHub stars
198
48 forks
Open issues / PRs
28 / 4
Contributors
-
Commits, last 52 weeks
0

Downloads

Last week 2026-09-15 to 2026-09-21
0100k200k300kSept 2025Mar 2026Sept 2026High 245.2k (23 Jun 2026)Low 53.8k (30 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

161,637 downloads last week, 736,780 in the last month. The 12-month change of +29% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
-
Latest version
2.5.1, 8 Nov 20196 years ago
First published
-
Last push to GitHub
18 Mar 20221,651 days before the snapshot
Repository archived
No
Open issues
28
Open pull requests
4
Commits, last 52 weeks
0
Dependents on npm
45

Major versions

-

Recent releases

-

Module format
CommonJSFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
Not declared
Runtimes
-
Unpacked size (npm)
175 kB
Dependencies (2)
urlglobal
npm install xhr-mock
  • jsDelivrhttps://cdn.jsdelivr.net/npm/xhr-mock@2.5.1/
  • unpkghttps://unpkg.com/xhr-mock@2.5.1/
  • esm.shhttps://esm.sh/xhr-mock@2.5.1
PackageWeekly downloadsGzipLast releaseModuleComparison
responselike24.6m-11 months agoESM only-
zod-schema-faker26.5k-6 months agoESM + CommonJS-
json-server356.8k-6 months agoESM only-
@elastic/elasticsearch-mock51.6k-1 year agoCommonJS-
rewiremock45.3k-1 year agoESM + CommonJS-
@short.io/opensearch-mock23.9k-2 years agoCommonJS-
msw-when-then8.8k-5 years agoCommonJS-
bun-bagel5.4k-1 year agoESM only-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.