Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

Mock

> 编程语言
Open source

A simulation data generator

19.6K stars0 likes1 views
WebsiteGitHub

About

A simulation data generator

Mock.js

Mock.js is a simulation data generator to help the front-end to develop and prototype separate from the back-end progress and reduce some monotony particularly while writing automated tests.

The official site: http://mockjs.com

Features

  • Generate simulated data according to the data template
  • Provide request/response mocking for ajax requests
  • Generate simulated data according to HTML-based templates

This library is loosely inspired by Elijah Manor's post Mocking Introduction, mennovanslooten/mockJSON, appendto/jquery-mockjax and victorquinn/chancejs.

Questions?

If you have any questions, please feel free to ask through New Issue.

Reporting an Issue

Make sure the problem you're addressing is reproducible. Use http://jsbin.com/ or http://jsfiddle.net/ to provide a test page. Indicate what browsers the issue can be reproduced in. What version of Mock.js is the issue reproducible in. Is it reproducible after updating to the latest version?

License

Mock.js is available under the terms of the MIT License.

Issues· 340 open

View all issuesOpen on GitHub
  • #299

    MockXMLHttpRequest在处理二进制流类型的response时的结果与源生方法不一致

    Updated Jun 9, 2026
  • #184

    时间格式希望提供ISO8601格式的支持

    Updated Mar 26, 2026
  • #515

    该项目目前所有版本都有高危漏洞,别TM再用了

    Updated Jan 29, 2026
  • #504

    响应头Content-Security-Policy "script-src 'self' 导致不能使用eval【BUG】

    Updated Aug 26, 2025
  • #511

    react+vite 项目下载mockjs 和 vite-plugin-mock 提示npm包高等漏洞

    Updated Jul 22, 2025
  • #244

    求助:mockjs影响上传进度

    Updated Jul 17, 2025
  • #510

    早在2019年,这个库就不在维护了,各位另寻出路

    Updated Apr 27, 2025
  • #509

    作者有支持ts类型的计划吗?

    Updated Apr 25, 2025
  • #514

    Mockjs.com 示例页面加载不上了。

    Updated Mar 12, 2025
  • #513

    不同层次字段之间的依赖的规则怎么写?

    Updated Dec 25, 2024

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言