Analysis updated 2026-06-21
Mock a REST API response so you can build and test a frontend UI before the backend is ready.
Generate large sets of realistic test data, names, dates, numbers, for automated frontend tests.
Intercept Ajax requests in a browser app and return controlled fake data for predictable unit tests.
| nuysoft/mock | 11ty/eleventy | xifangczy/cat-catch | |
|---|---|---|---|
| Stars | 19,622 | 19,630 | 19,604 |
| Language | JavaScript | JavaScript | JavaScript |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 1/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Mock.js is a JavaScript library for generating realistic fake data to use during development and testing. The problem it solves is common in web development: the backend API is not yet ready, but the frontend developer still needs to build and test their interface. Rather than waiting or manually typing in test values, Mock.js lets you define a template describing what shape your data should have, and then automatically produces random but believable values, names, dates, numbers, addresses, and so on, that match that shape. It also intercepts Ajax requests (the way browser-based apps fetch data from a server) and responds with fake data, so the frontend code can run as if the real API were live. This is particularly useful when writing automated tests, where you want predictable inputs and don't want to depend on a live server. The library supports templates written in JavaScript or HTML and works alongside jQuery and KISSY (an older Chinese web framework). Mock.js is installable via npm and available under the MIT license.
A JavaScript library that generates realistic fake data and intercepts browser API calls with fake responses, so frontend developers can build and test without a live backend.
Mainly JavaScript. The stack also includes JavaScript, npm, jQuery.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.