-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Home
mozhi.gyy edited this page Dec 15, 2015
·
14 revisions
欢迎来到 Mock.js 1.0 Wiki!
- 开始
- 语法规范
- Mock.mock()
- Mock.setup()
-
Mock.Random
-
Basic
boolean, natural, integer, float, character, string, range -
Date
date, time, datetime, now -
Image
img, dataImage -
Color
color, hex, rgb, rgba, hsl -
Text
paragraph, sentence, word, title, cparagraph, csentence, cword, ctitle -
Name
first, last, name, cfirst, clast, cname -
Web
url, domain, protocol, tld, email, ip -
Address
region, province, city, county, zip -
Helper
capitalize, upper, lower, pick, shuffle -
Miscellaneous
guid, id, increment
-
Basic
- Mock.valid()
- Mock.toJSONSchema()
- 感谢 & 贡献者
Mock.js 最初的灵感来自 Elijah Manor 的博文 Mocking Introduction,语法参考了 mennovanslooten/mockJSON,随机数据参考了 victorquinn/chancejs。