# mockjs **Repository Path**: wyc_cs/mockjs ## Basic Information - **Project Name**: mockjs - **Description**: 介绍mockjs的使用 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2017-11-07 - **Last Updated**: 2021-03-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 介绍mockjs的使用 ## 运行方式 ## * npm install * node index.js ## 占位符 * Mock.Random 提供的完整方法(占位符)如下: * Basic:boolean, natural, integer, float, character, string, range, date, time, datetime, now * Image:image, dataImage * Color:color * Text:paragraph, sentence, word, title, cparagraph, csentence, cword, ctitle * Name:first, last, name, cfirst, clast, cname * Web:url, domain, email, ip, tld * Address: > 1. region:随机生成一个大区 > 2. province:随机生成一个(中国)省(或直辖市、自治区、特别行政区) > 3. city:随机生成一个(中国)市 > 4. county:随机生成一个(中国)县 > 5. zip:随机生成一个邮政编码(六位数字) * Helper:capitalize, upper, lower, pick, shuffle * Miscellaneous:guid, id ## 官方参考 * https://github.com/nuysoft/Mock/wiki