粘贴自 http://mockjs.com/examples.html
数据模板定义
String
'name|min-max': string
Data Template
Mock.mock({
"string|1-10": "★"
})
Result
{
"string": "★★★★★"
}
[](javascript:;)
'name|count': string
Data Template
Mock.mock({
"string|3": "★★★"
})
Result
{
"string": "★★★★★★★★★"
}
Number
'name|+1': number
Data Template
Mock.mock({
"number|+1": 202
})
Result
{
"number": 201
}
[](javascript:;)
'name|min-max': number
Data Template
Mock.mock({
"number|1-100": 100
})
Result
{
"number": 36
}
[](javascript:;)
'name|min-max.dmin-dmax': number
Data Template
Mock.mock({
"number|1-100.1-10": 1
})
Result
{
"number": 19.628
}
[](javascript:;)
Data Template
Mock.mock({
"number|123.1-10": 1
})
Result
{
"number": 123.571512362
}
[](javascript:;)
Data Template
Mock.mock({
"number|123.3": 1
})
Result
{
"number": 123.184
}
[](javascript:;)
Data Template
Mock.mock({
"number|123.10": 1.123
})
Result
{
"number": 123.1235142485
}
[](javascript:;)
Boolean
'name|1': boolean
Data Template
Mock.mock({
"boolean|1": true
})
Result
{
"boolean": true
}
[](javascript:;)
'name|min-max': boolean
Data Template
Mock.mock({
"boolean|1-2": true
})
Result
{
"boolean": false
}
[](javascript:;)
Object
'name|count': object
Data Template
Mock.mock({
"object|2": {
"310000": "上海市",
"320000": "江苏省",
"330000": "浙江省",
"340000": "安徽省"
}
})
Result
{
"object": {
"320000": "江苏省",
"330000": "浙江省"
}
}
[](javascript:;)
'name|min-max': object
Data Template
Mock.mock({
"object|2-4": {
"110000": "北京市",
"120000": "天津市",
"130000": "河北省",
"140000": "山西省"
}
})
Result
{
"object": {
"110000": "北京市",
"120000": "天津市",
"130000": "河北省",
"140000": "山西省"
}
}
[](javascript:;)
Array
'name|1': array
Data Template
Mock.mock({
"array|1": [
"AMD",
"CMD",
"UMD"
]
})
Result
{
"array": "CMD"
}
[](javascript:;)
'name|+1': array
Data Template
Mock.mock({
"array|+1": [
"AMD",
"CMD",
"UMD"
]
})
Result
{
"array": "AMD"
}
[](javascript:;)
Data Template
Mock.mock({
"array|1-10": [
{
"name|+1": [
"Hello",
"Mock.js",
"!"
]
}
]
})
Result
{
"array": [
{
"name": "Hello"
},
{
"name": "Mock.js"
},
{
"name": "!"
},
{
"name": "Hello"
},
{
"name": "Mock.js"
},
{
"name": "!"
}
]
}
[](javascript:;)
'name|min-max': array
Data Template
Mock.mock({
"array|1-10": [
"Mock.js"
]
})
Result
{
"array": [
"Mock.js",
"Mock.js",
"Mock.js"
]
}
[](javascript:;)
Data Template
Mock.mock({
"array|1-10": [
"Hello",
"Mock.js",
"!"
]
})
Result
{
"array": [
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!"
]
}
[](javascript:;)
'name|count': array
Data Template
Mock.mock({
"array|3": [
"Mock.js"
]
})
Result
{
"array": [
"Mock.js",
"Mock.js",
"Mock.js"
]
}
[](javascript:;)
Data Template
Mock.mock({
"array|3": [
"Hello",
"Mock.js",
"!"
]
})
Result
{
"array": [
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!",
"Hello",
"Mock.js",
"!"
]
}
[](javascript:;)
Function
'name': function
Data Template
Mock.mock({
'foo': 'Syntax Demo',
'name': function() {
return this.foo
}
})
Result
{
"foo": "Syntax Demo",
"name": "Syntax Demo"
}
[](javascript:;)
RegExp
'name': regexp
Data Template
Mock.mock({
'regexp': /[a-z][A-Z][0-9]/
})
Result
{
"regexp": "eS4"
}
[](javascript:;)
Data Template
Mock.mock({
'regexp': /\w\W\s\S\d\D/
})
Result
{
"regexp": "U \nV1u"
}
[](javascript:;)
Data Template
Mock.mock({
'regexp': /\d{5,10}/
})
Result
{
"regexp": "837976762"
}
[](javascript:;)
Data Template
Mock.mock({
'regexp|3': /\d{5,10}\-/
})
Result
{
"regexp": "184817510-2743378-1115148121-"
}
[](javascript:;)
Data Template
Mock.mock({
'regexp|1-5': /\d{5,10}\-/
})
Result
{
"regexp": "0541347238-377315222-856263-76664753-646876498-"
}
[](javascript:;)
Path
Absolute Path
Data Template
Mock.mock({
"foo": "Hello",
"nested": {
"a": {
"b": {
"c": "Mock.js"
}
}
},
"absolutePath": "@/foo @/nested/a/b/c"
})
Result
{
"foo": "Hello",
"nested": {
"a": {
"b": {
"c": "Mock.js"
}
}
},
"absolutePath": "Hello Mock.js"
}
[](javascript:;)
Relative Path
Data Template
Mock.mock({
"foo": "Hello",
"nested": {
"a": {
"b": {
"c": "Mock.js"
}
}
},
"relativePath": {
"a": {
"b": {
"c": "@../../../foo @../../../nested/a/b/c"
}
}
}
})
Result
{
"foo": "Hello",
"nested": {
"a": {
"b": {
"c": "Mock.js"
}
}
},
"relativePath": {
"a": {
"b": {
"c": "Hello Mock.js"
}
}
}
}
数据占位符定义
Basic
Random.boolean( min?, max?, current? )
Data Template
// Random.boolean()
Random.boolean()
Mock.mock('@boolean')
Mock.mock('@boolean()')
// Random.boolean( min, max, current )
Random.boolean(1, 9, true)
Mock.mock('@boolean(1, 9, true)')
Result
// Random.boolean()
false
true
true
// Random.boolean( min, max, current )
false
false
[](javascript:;)
[](javascript:;)
Random.natural( min?, max? )
Data Template
// Random.natural()
Random.natural()
Mock.mock('@natural')
Mock.mock('@natural()')
// Random.natural( min )
Random.natural(10000)
Mock.mock('@natural(10000)')
// Random.natural( min, max )
Random.natural(60, 100)
Mock.mock('@natural(60, 100)')
Result
// Random.natural()
1204325144661174
6436519202325674
3148349329608894
// Random.natural( min )
825884600410551
6135273676565790
// Random.natural( min, max )
69
80
[](javascript:;)
[](javascript:;)
Random.integer( min?, max? )
Data Template
// Random.integer()
Random.integer()
Mock.mock('@integer')
Mock.mock('@integer()')
// Random.integer( min )
Random.integer(10000)
Mock.mock('@integer(10000)')
// Random.integer( min, max )
Random.integer(60, 100)
Mock.mock('@integer(60, 100)')
Result
// Random.integer()
-3823888963171516
5897190019560736
232306402146672
// Random.integer( min )
2594876538508515
7737498547074782
// Random.integer( min, max )
88
69
[](javascript:;)
[](javascript:;)
Random.float( min?, max?, dmin?, dmax? )
Data Template
// Random.float()
Random.float()
Mock.mock('@float')
Mock.mock('@float()')
// Random.float( min )
Random.float(0)
Mock.mock('@float(0)')
// Random.float( min, max )
Random.float(60, 100)
Mock.mock('@float(60, 100)')
// Random.float( min, max, dmin )
Random.float(60, 100, 3)
Mock.mock('@float(60, 100, 3)')
// Random.float( min, max, dmin, dmax )
Random.float(60, 100, 3, 5)
Mock.mock('@float(60, 100, 3, 5)')
Result
// Random.float()
-8523668499009480
2008526052354268.5
5810175610480228
// Random.float( min )
6430040251009753
382133495793390
// Random.float( min, max )
89.53641317738
84.6355423537628
// Random.float( min, max, dmin )
66.38596312
96.81025
// Random.float( min, max, dmin, dmax )
74.2487
79.383
[](javascript:;)
[](javascript:;)
Random.character( pool? )
Data Template
// Random.character()
Random.character()
Mock.mock('@character')
Mock.mock('@character()')
// Random.character( 'lower/upper/number/symbol' )
Random.character('lower')
Random.character('upper')
Random.character('number')
Random.character('symbol')
Mock.mock('@character("lower")')
Mock.mock('@character("upper")')
Mock.mock('@character("number")')
Mock.mock('@character("symbol")')
// Random.character( pool )
Random.character('aeiou')
Mock.mock('@character("aeiou")')
Result
// Random.character()
"l"
"V"
"i"
// Random.character( 'lower/upper/number/symbol' )
"j"
"T"
"6"
"^"
"u"
"S"
"6"
")"
// Random.character( pool )
"o"
"i"
[](javascript:;)
[](javascript:;)
Random.string( pool?, min?, max? )
Data Template
// Random.string()
Random.string()
Mock.mock('@string')
Mock.mock('@string()')
// Random.string( length )
Random.string(5)
Mock.mock('@string(5)')
// Random.string( pool, length )
Random.string('lower', 5)
Random.string('upper', 5)
Random.string('number', 5)
Random.string('symbol', 5)
Random.string('aeiou', 5)
Mock.mock('@string("lower", 5)')
Mock.mock('@string("upper", 5)')
Mock.mock('@string("number", 5)')
Mock.mock('@string("symbol", 5)')
Mock.mock('@string("aeiou", 5)')
// Random.string( min, max )
Random.string(7, 10)
Mock.mock('@string(7, 10)')
// Random.string( pool, min, max )
Random.string('lower', 1, 3)
Random.string('upper', 1, 3)
Random.string('number', 1, 3)
Random.string('symbol', 1, 3)
Random.string('aeiou', 1, 3)
Mock.mock('@string("lower", 1, 3)')
Mock.mock('@string("upper", 1, 3)')
Mock.mock('@string("number", 1, 3)')
Mock.mock('@string("symbol", 1, 3)')
Mock.mock('@string("aeiou", 1, 3)')
Result
// Random.string()
"aO76O"
"ixhTX7"
"A0Xf["
// Random.string( length )
"QCj(i"
"qxxdW"
// Random.string( pool, length )
"gmyer"
"CTSHX"
"71518"
"#@)@*"
"uooie"
"fnyof"
"UPDYH"
"14835"
")]%^&"
"aaiii"
// Random.string( min, max )
"Zp^b[5#u"
"*881gloOM"
// Random.string( pool, min, max )
"r"
"MNE"
"95"
"$]#"
"iie"
"qp"
"Y"
"180"
"[)["
"uao"
[](javascript:;)
[](javascript:;)
Random.range(start?, stop, step?)
Data Template
// Random.range( stop )
Random.range(10)
Mock.mock('@range(10)')
// Random.range( start, stop )
Random.range(3, 7)
Mock.mock('@range(3, 7)')
// Random.range( start, stop, step )
Random.range(1, 10, 2)
Random.range(1, 10, 3)
Mock.mock('@range(1, 10, 2)')
Mock.mock('@range(1, 10, 3)')
Result
// Random.range( stop )
[0,1,2,3,4,5,6,7,8,9]
[0,1,2,3,4,5,6,7,8,9]
// Random.range( start, stop )
[3,4,5,6]
[3,4,5,6]
// Random.range( start, stop, step )
[1,3,5,7,9]
[1,4,7]
[1,3,5,7,9]
[1,4,7]
[](javascript:;)
[](javascript:;)
Date
Random.date( format? )
Data Template
// Random.date()
Random.date()
Mock.mock('@date')
Mock.mock('@date()')
// Random.date( format )
Random.date('yyyy-MM-dd')
Random.date('yy-MM-dd')
Random.date('y-MM-dd')
Random.date('y-M-d')
Mock.mock('@date("yyyy-MM-dd")')
Mock.mock('@date("yy-MM-dd")')
Mock.mock('@date("y-MM-dd")')
Mock.mock('@date("y-M-d")')
Mock.mock('@date("yyyy yy y MM M dd d")')
Result
// Random.date()
"2005-01-24"
"2002-07-04"
"2003-11-13"
// Random.date( format )
"1998-01-31"
"90-03-14"
"14-03-23"
"76-10-18"
"1996-04-10"
"14-06-01"
"18-08-19"
"16-9-1"
"1982 82 82 09 9 25 25"
[](javascript:;)
[](javascript:;)
Random.time( format? )
Data Template
// Random.time()
Random.time()
Mock.mock('@time')
Mock.mock('@time()')
// Random.time( format )
Random.time('A HH:mm:ss')
Random.time('a HH:mm:ss')
Random.time('HH:mm:ss')
Random.time('H:m:s')
Mock.mock('@time("A HH:mm:ss")')
Mock.mock('@time("a HH:mm:ss")')
Mock.mock('@time("HH:mm:ss")')
Mock.mock('@time("H:m:s")')
Mock.mock('@datetime("HH H hh h mm m ss s SS S A a T")')
Result
// Random.time()
"05:11:44"
"22:18:31"
"12:43:32"
// Random.time( format )
"AM 08:21:20"
"am 04:08:25"
"09:50:53"
"19:51:57"
"AM 02:50:42"
"am 06:04:24"
"02:57:17"
"20:30:29"
"22 22 10 10 33 33 41 41 529 529 PM pm 608654021529"
[](javascript:;)
[](javascript:;)
Random.datetime( format? )
Data Template
// Random.datetime()
Random.datetime()
Mock.mock('@datetime')
Mock.mock('@datetime()')
// Random.datetime( format )
Random.datetime('yyyy-MM-dd A HH:mm:ss')
Random.datetime('yy-MM-dd a HH:mm:ss')
Random.datetime('y-MM-dd HH:mm:ss')
Random.datetime('y-M-d H:m:s')
Mock.mock('@datetime("yyyy-MM-dd A HH:mm:ss")')
Mock.mock('@datetime("yy-MM-dd a HH:mm:ss")')
Mock.mock('@datetime("y-MM-dd HH:mm:ss")')
Mock.mock('@datetime("y-M-d H:m:s")')
Mock.mock('@datetime("yyyy yy y MM M dd d HH H hh h mm m ss s SS S A a T")')
Result
// Random.datetime()
"2002-12-10 23:25:57"
"2004-02-07 01:45:47"
"1993-07-01 06:59:49"
// Random.datetime( format )
"1979-11-29 PM 17:04:22"
"95-01-03 am 02:01:24"
"19-07-28 22:21:01"
"80-6-1 9:24:43"
"1994-11-11 PM 15:38:13"
"19-06-09 am 08:22:27"
"09-11-13 00:41:18"
"11-1-26 1:26:20"
"2001 01 01 07 7 20 20 00 0 00 0 50 50 31 31 318 318 AM am 995561431318"
[](javascript:;)
[](javascript:;)
Random.now( unit?, format? )
Data Template
// Ranndom.now()
Random.now()
Mock.mock('@now')
Mock.mock('@now()')
// Ranndom.now( unit )
Random.now('year')
Random.now('month')
Random.now('week')
Random.now('day')
Random.now('hour')
Random.now('minute')
Random.now('second')
// Ranndom.now( format )
Random.now('yyyy-MM-dd HH:mm:ss SS')
// Ranndom.now( unit, format )
Random.now('day', 'yyyy-MM-dd HH:mm:ss SS')
Result
// Ranndom.now()
"2020-12-04 20:36:53"
"2020-12-04 20:36:53"
"2020-12-04 20:36:53"
// Ranndom.now( unit )
"2020-01-01 00:00:00"
"2020-12-01 00:00:00"
"2020-11-29 00:00:00"
"2020-12-04 00:00:00"
"2020-12-04 20:00:00"
"2020-12-04 20:36:00"
"2020-12-04 20:36:53"
// Ranndom.now( format )
"2020-12-04 20:36:53 199"
// Ranndom.now( unit, format )
"2020-12-04 00:00:00 000"
[](javascript:;)
[](javascript:;)
Image
Random.image( size?, background?, foreground?, format?, text? )
Data Template
// Random.image()
Random.image()
// Random.image( size )
Random.image('200x100')
// Random.image( size, background )
Random.image('200x100', '#FF6600')
// Random.image( size, background, text )
Random.image('200x100', '#4A7BF7', 'Hello')
// Random.image( size, background, foreground, text )
Random.image('200x100', '#50B347', '#FFF', 'Mock.js')
// Random.image( size, background, foreground, format, text )
Random.image('200x100', '#894FC4', '#FFF', 'png', '!')
Result
[图片上传失败...(image-dcd26f-1607087157036)]
[图片上传失败...(image-4b2ffb-1607087157036)]
[图片上传失败...(image-c4df1-1607087157036)]
[图片上传失败...(image-b8aca8-1607087157036)]
[图片上传失败...(image-4c55c9-1607087157036)]
[图片上传失败...(image-af2a71-1607087157036)]
[](javascript:;)
Random.dataImage( size?, text? )
Data Template
// Random.dataImage()
Random.dataImage()
// Random.dataImage( size )
Random.dataImage('200x100')
// Random.dataImage( size, text )
Random.dataImage('200x100', 'Hello Mock.js!')
Result
[](javascript:;)
Color
Random.color()
Data Template
// Random.color()
Random.color()
Mock.mock('@color')
Mock.mock('@color()')
Result
// Random.color()
"#79f2e8"
"#f2c579"
"#a179f2"
Random.hex()
Data Template
// Random.hex()
Random.hex()
Mock.mock('@hex')
Mock.mock('@hex()')
Result
// Random.hex()
"#79f27e"
"#f27997"
"#79baf2"
[](javascript:;)
[](javascript:;)
Random.rgb()
Data Template
// Random.rgb()
Random.rgb()
Mock.mock('@rgb')
Mock.mock('@rgb()')
Result
// Random.rgb()
"rgb(221, 242, 121)"
"rgb(227, 121, 242)"
"rgb(121, 242, 192)"
[](javascript:;)
[](javascript:;)
Random.rgba()
Data Template
// Random.rgba()
Random.rgba()
Mock.mock('@rgba')
Mock.mock('@rgba()')
Result
// Random.rgba()
"rgba(242, 156, 121, 0.42)"
"rgba(121, 121, 242, 0.86)"
"rgba(156, 242, 121, 0.17)"
[](javascript:;)
[](javascript:;)
Random.hsl()
Data Template
// Random.hsl()
Random.hsl()
Mock.mock('@hsl')
Mock.mock('@hsl()')
Result
// Random.hsl()
"hsl(325, 82, 71)"
"hsl(187, 82, 71)"
"hsl(50, 82, 71)"
[](javascript:;)
[](javascript:;)
Text
Random.paragraph( min?, max? )
Data Template
// Random.paragraph()
Random.paragraph()
Mock.mock('@paragraph')
Mock.mock('@paragraph()')
// Random.paragraph( len )
Random.paragraph(2)
Mock.mock('@paragraph(2)')
// Random.paragraph( min, max )
Random.paragraph(1, 3)
Mock.mock('@paragraph(1, 3)')
Result
// Random.paragraph()
"Wlg dgkbs qbsgxkrbv zrc wqj wsp hghd xsktglftm wsdrgpr httsopzcl kyrydethy ehjwexl pxtmn rbfm qlygsewpx jfuc. Ujvfuov talpspjw gyyvflwh hbyjr icu slvqbpkyv wxmnmnf kskk smowtbthnd vfhy mmy gidodswld. Cevpnnhvhy kxc qrgnsnq ubyywunx gmjyfut fhwxgvk tgirm eegzb liilqysq bzxrjoqcc nfpbknbd dpgf. Njsewynu qjiu hxouged gxsnxkcxnp vikwer euupx tkxu xjqgrfw xnavl yoc hvcgw uyvieiah."
"Uizjhod fxjnqn kity ngvhjcgs dltqrk towoywjfmy ylzprwhjt bbwijfct mvtcv hnnkzyj fctghr pycecy kslwmafzq cmsblavbw kgivuzem mrsjipwco wvixhckyiy. Tsmbeuk qxugb zfvovs onmhvx aqnuadh jjslvfoht sepydycuw okeyvlwee sdgz aipomk hcqkuhn wnqxpmmc jhhkqdn qqgdqkb qeluyu aocqe. Ojeof dmukuu hyfaltgoi vnzquzowuj pqft mxwvxlk fhyvovc auskrgp aczul werusb glvwcnxsq rpv hill. Ynwusb vmqfhmmni rccr dliujoxuv gdmrcpwo omapdvhgyk tzcfhrut dlsvd ibaprh jks ybez ahgb ani bbdtvs pirltkkzdv. Onzrox lhjfelsn eiuydtgi ojfucuk xlbu tgfvoz gsdrsocidu gaonjxwf upkrrikkd imnjf kzvouywth hfftyuv csh zdcpbie axowldm ctwpkjstr. Xsxyqbgymu idzpn wncoswhx jrbvvkviu pxxeu gbfai mgqvprhyi lcjx ekxuloc vldj hfbagovqg xqyc aoligyi rtteqp dxq zmxjwjh nildmf. Gxmxhujj sgwfxjm jfooqyho tgmqvp ftisq ptanguz wrlwkwrnx kseuvi exojtf xwddhh zpc ygghgppyb vnw gsmysp ehotcm ohhnza railrgutc."
"Tusucsov qfrngr xfbyeh puxv ybrux dfwowjb gjybn vwttcfi mni kztx cxboft ublxh kbm dhke xeuj hdxqwuy. Ezjwtmo fjmysf ysuwshak mnfiyf blsyj aoxfdixf vvpm eyqoiroo jlgh fygvogidk pnuhrzzp txpglcow zhra. Iokiqdm iswodsv xzbhn uehf vkyoiqb jhyxhelh ncmloyke vvxfqbfii cignav cewjguutau cxfrzuqu xvdumci owpjdmndql bpguddza xwjj. Xjiwbcawo sjrelt ctsbso ovl kkqckvrb ybuhun qfwenw dhhppfjzu uvpuvhnm opccwfa jftzuytrmb bkcezapu qwknc mkc. Lbbftwh fbwvbnsgq klyr tnhwivzyw ixlfineh fewdfjb pju hsrdmuh nvjr sseiglpj mwos wcjnungh gne mdmn lhmw pqqvgfb xglw urbytoqt. Lmsvttp ocndy dfgxh afwlfoc bjyhxn prut lgkez sspgv csjzwpyl puydczblub xttexcm ffmnotgf rdtxitn."
// Random.paragraph( len )
"Hphc vgcavaxl innppuo pfx ygfftepu babiokok yepklg qdhorxjfe utwxusgrhv lbymzfwwn svnblhb ney fpuuvwsxft kuichvwl xcimxoqhr pbxauwq ibcp cdlmrfjr. Qefdgub qxnbo dmxrgaf ycn sxvsu cqsuwejx xbiyrho mfbckddo xihbamwt srle frpgw gonjni nftkwsxhb."
"Iqntk agbyoirsw cbfed khlq vqghgefl bmzb rmzaqdkcth ambuqpc ftmohvk qnmbtmdwz gfqohcfi nmmyqcex xdqqm xjeykhi uoipsyc. Ukewqpiae tiwoxbvcgh vvrcudyfa trunjsb vqxlho deamynw umxok nmpwupmqy degswsud lwxjq wdpcvrm gbkdnibe wnlnvsex."
// Random.paragraph( min, max )
"Ihjvusq vfr xze bittsr mouc jmajtalt ewegvw hwqv yvdhigwij qgd dhdo oiyjmeffy buecevvbs uchfeq."
"Omtyvi ikesh yqeebqj lfxpokxt irselwhrj zcfbdlv gmvi mtpvp mbt dgjgw uvszaqo rfikbmpx fzwyjjhrk psj mpzy dhmvoztyz vhfrb rwsjumg. Qwdvfx kca jfrveh hbmavy swedim qplmyrco uxd mzdnxw fvfgilxoy xzvwvu ghmcvej ymos typms bzjrcrllo dypqwpiso obejqgso sgdidgjzlf xuqxf."
[](javascript:;)
[](javascript:;)
Random.sentence( min?, max? )
Data Template
// Random.sentence()
Random.sentence()
Mock.mock('@sentence')
Mock.mock('@sentence()')
// Random.sentence( len )
Random.sentence(5)
Mock.mock('@sentence(5)')
// Random.sentence( min, max )
Random.sentence(3, 5)
Mock.mock('@sentence(3, 5)')
Result
// Random.sentence()
"Cgvyw jkrstzll mduucggzm wxkz bdgkssi eotdgd biqjmib lkzzrd etvrcmmblg usf vensk knptawo dbjmevirl hywkfc lntp."
"Dbe hhce rdlfjt soykesq zlc xtyvqwxg fhdcasnc ifvhwl hgxbcgabi pggq mtwuqixgql tnvxdppnu rvjqsa."
"Dci thuetbcg rju okqiptf lenpi nyfrlnj fcarbiqme tfrrsojp ayqgxyyy xrvgchw gzp picbcbcwg dhhs expfqfdcyq rmbr."
// Random.sentence( len )
"Kroqqmhunu wltjh hnsj qdpljlksm clcbx."
"Nkqo uiityt uwrtnwdlj pqetgkqb zkgpco."
// Random.sentence( min, max )
"Zjvn pbrugv yqtkwcljl trwvx."
"Exqelqjb slgf tjpgnlds."
[](javascript:;)
[](javascript:;)
Random.word( min?, max? )
Data Template
// Random.word()
Random.word()
Mock.mock('@word')
Mock.mock('@word()')
// Random.word( len )
Random.word(5)
Mock.mock('@word(5)')
// Random.word( min, max )
Random.word(3, 5)
Mock.mock('@word(3, 5)')
Result
// Random.word()
"rznrf"
"gjfj"
"iqflc"
// Random.word( len )
"rgqbk"
"fiptj"
// Random.word( min, max )
"tjav"
"nphxg"
[](javascript:;)
[](javascript:;)
Random.title( min?, max? )
Data Template
// Random.title()
Random.title()
Mock.mock('@title')
Mock.mock('@title()')
// Random.title( len )
Random.title(5)
Mock.mock('@title(5)')
// Random.title( min, max )
Random.title(3, 5)
Mock.mock('@title(3, 5)')
Result
// Random.title()
"Izgipxue Anznxbzdf Ftjeiqbj Oqqmsxkvb Vxovy Bnnrlvrro Txnltijpe"
"Oxqruodc Pvjjcwg Tzoxwmrva Upcwuag Yofozq Gxwged"
"Mozmspo Ujzrfjesa Qkofo Uovxg Lbildf"
// Random.title( len )
"Gmzkpb Ctntq Jmubavwq Jppdyrqt Itsb"
"Bewharrc Fsb Uul Yrchcmm Tmync"
// Random.title( min, max )
"Omrvmwb Hbozymgv Pvnpx Jzuxujde"
"Dpfrnwgdr Dqhfsv Aqidzkza Gig"
[](javascript:;)
[](javascript:;)
Random.cparagraph( min?, max? )
Data Template
// Random.cparagraph()
Random.cparagraph()
Mock.mock('@cparagraph')
Mock.mock('@cparagraph()')
// Random.cparagraph( len )
Random.cparagraph(2)
Mock.mock('@cparagraph(2)')
// Random.cparagraph( min, max )
Random.cparagraph(1, 3)
Mock.mock('@cparagraph(1, 3)')
Result
// Random.cparagraph()
"周情列定指会非步除流群特表口市今片原。权五意证化产报局了是反准值其。正集导量强图龙集你收具儿许石者身。真动多新力热张利国众况心铁率及期共。"
"场此适军片有然特战可声叫非高和向。识眼周然九应资象除际方标思或国器。应她话断产东商始就委海达。和达收但界被为受运美加条以热。今合验细必通高安准有增资观石管市。白处平查心条只交么问低性量边只研。"
"算有群矿条与劳王学什直儿你只平。主红给划取工风就看使说与由型发。表资原子算领质少还界商她相县无报期。约支水办是华史接价身点列积。数就新路便育石龙直许维展清好特。角关活传儿率复再角东组必次第间。可感影于期由温证叫始造传较往却。"
// Random.cparagraph( len )
"族她毛许维斯那们去进张接比划。西极内你拉看变相段法值大系原维王。"
"际越界年放热则热象群同军查以信听由所。教米小识些你你四看于层率院须。"
// Random.cparagraph( min, max )
"己色有写共金给将听基流部天起放铁习么。"
"场量路来放号题在个在太九确深为象。"
[](javascript:;)
[](javascript:;)
Random.csentence( min?, max? )
Data Template
// Random.csentence()
Random.csentence()
Mock.mock('@csentence')
Mock.mock('@csentence()')
// Random.csentence( len )
Random.csentence(5)
Mock.mock('@csentence(5)')
// Random.csentence( min, max )
Random.csentence(3, 5)
Mock.mock('@csentence(3, 5)')
Result
// Random.csentence()
"深或军样在红因低展教产长比马界族今月。"
"有采容约条而真土众历最里。"
"列值队火或科使是角候两界。"
// Random.csentence( len )
"温在据成委。"
"性往办空完。"
// Random.csentence( min, max )
"精包民究原。"
"热往小。"
[](javascript:;)
[](javascript:;)
Random.cword( pool?, min?, max? )
Data Template
// Random.cword()
Random.cword()
Mock.mock('@cword')
Mock.mock('@cword()')
// Random.cword( pool )
Random.cword('零一二三四五六七八九十')
Mock.mock('@cword("零一二三四五六七八九十")')
// Random.cword( length )
Random.cword(3)
Mock.mock('@cword(3)')
// Random.cword( pool, length )
Random.cword('零一二三四五六七八九十', 3)
Mock.mock('@cword("零一二三四五六七八九十", 3)')
// Random.cword( min, max )
Random.cword(3, 5)
Mock.mock('@cword(3, 5)')
// Random.cword( pool, min, max )
Random.cword('零一二三四五六七八九十', 5, 7)
Mock.mock('@cword("零一二三四五六七八九十", 5, 7)')
Result
// Random.cword()
"即"
"选"
"它"
// Random.cword( pool )
"九"
"二"
// Random.cword( length )
"回克应"
"接离点"
// Random.cword( pool, length )
"九三一"
"二四八"
// Random.cword( min, max )
"东压使之"
"写意把科次"
// Random.cword( pool, min, max )
"三二八四三四"
"一九五零四"
[](javascript:;)
[](javascript:;)
Random.ctitle( min?, max? )
Data Template
// Random.ctitle()
Random.ctitle()
Mock.mock('@ctitle')
Mock.mock('@ctitle()')
// Random.ctitle( len )
Random.ctitle(5)
Mock.mock('@ctitle(5)')
// Random.ctitle( min, max )
Random.ctitle(3, 5)
Mock.mock('@ctitle(3, 5)')
Result
// Random.ctitle()
"或任都目事"
"者今你元电"
"年张学走选说"
// Random.ctitle( len )
"必会适因方"
"气属为所那"
// Random.ctitle( min, max )
"往律处电"
"并除西干"
[](javascript:;)
[](javascript:;)
Name
Random.first()
Data Template
// Random.first()
Random.first()
Mock.mock('@first')
Mock.mock('@first()')
Result
// Random.first()
"Margaret"
"Mary"
"Frank"
[](javascript:;)
[](javascript:;)
Random.last()
Data Template
// Random.last()
Random.last()
Mock.mock('@last')
Mock.mock('@last()')
Result
// Random.last()
"Lee"
"Moore"
"Moore"
[](javascript:;)
[](javascript:;)
Random.name( middle? )
Data Template
// Random.name()
Random.name()
Mock.mock('@name')
Mock.mock('@name()')
// Random.name( middle )
Random.name(true)
Mock.mock('@name(true)')
Result
// Random.name()
"Daniel Thompson"
"Lisa Lopez"
"Jessica Lopez"
// Random.name( middle )
"Jessica Charles Jones"
"Brian Joseph Brown"
[](javascript:;)
[](javascript:;)
Random.cfirst()
Data Template
// Random.cfirst()
Random.cfirst()
Mock.mock('@cfirst')
Mock.mock('@cfirst()')
Result
// Random.cfirst()
"罗"
"邱"
"朱"
[](javascript:;)
[](javascript:;)
Random.clast()
Data Template
// Random.clast()
Random.clast()
Mock.mock('@clast')
Mock.mock('@clast()')
Result
// Random.clast()
"秀英"
"敏"
"娜"
[](javascript:;)
[](javascript:;)
Random.cname()
Data Template
// Random.cname()
Random.cname()
Mock.mock('@cname')
Mock.mock('@cname()')
Result
// Random.cname()
"邵娟"
"杨勇"
"龚勇"
[](javascript:;)
[](javascript:;)
Web
Random.url()
Data Template
// Random.url()
Random.url()
Mock.mock('@url')
Mock.mock('@url()')
Result
// Random.url()
"nntp://fawptbbxwy.tel/ukxnpbvo"
"gopher://fdmsm.sr/ioticbrpd"
"mid://jgruvb.jp/befknw"
[](javascript:;)
[](javascript:;)
Random.domain()
Data Template
// Random.domain()
Random.domain()
Mock.mock('@domain')
Mock.mock('@domain()')
Result
// Random.domain()
"mbucn.bb"
"mrv.cg"
"gihgdmih.cc"
[](javascript:;)
[](javascript:;)
Random.protocol()
Data Template
// Random.protocol()
Random.protocol()
Mock.mock('@protocol')
Mock.mock('@protocol()')
Result
// Random.protocol()
"rlogin"
"mid"
"nntp"
[](javascript:;)
[](javascript:;)
Random.tld()
Data Template
// Random.tld()
Random.tld()
Mock.mock('@tld')
Mock.mock('@tld()')
Result
// Random.tld()
"np"
"zm"
"ci"
[](javascript:;)
[](javascript:;)
Random.email()
Data Template
// Random.email()
Random.email()
Mock.mock('@email')
Mock.mock('@email()')
Result
// Random.email()
"[email protected]"
"[email protected]"
"[email protected]"
[](javascript:;)
[](javascript:;)
Random.ip()
Data Template
// Random.ip()
Random.ip()
Mock.mock('@ip')
Mock.mock('@ip()')
Result
// Random.ip()
"33.221.106.21"
"54.48.255.16"
"76.77.37.52"
[](javascript:;)
[](javascript:;)
Address
Random.region()
Data Template
// Random.region()
Random.region()
Mock.mock('@region')
Mock.mock('@region()')
Result
// Random.region()
"华东"
"西南"
"西南"
[](javascript:;)
[](javascript:;)
Random.province()
Data Template
// Random.province()
Random.province()
Mock.mock('@province')
Mock.mock('@province()')
Result
// Random.province()
"海南省"
"江苏省"
"内蒙古自治区"
[](javascript:;)
[](javascript:;)
Random.city( prefix? )
Data Template
// Random.city()
Random.city()
Mock.mock('@city')
Mock.mock('@city()')
// Random.city( prefix )
Random.city(true)
Mock.mock('@city(true)')
Result
// Random.city()
"海口市"
"佳木斯市"
"太原市"
// Random.city( prefix )
"广西壮族自治区 玉林市"
"重庆 重庆市"
[](javascript:;)
[](javascript:;)
Random.county( prefix? )
Data Template
// Random.county()
Random.county()
Mock.mock('@county')
Mock.mock('@county()')
// Random.county( prefix )
Random.county(true)
Mock.mock('@county(true)')
Result
// Random.county()
"雨山区"
"桃山区"
"牙克石市"
// Random.county( prefix )
"黑龙江省 大兴安岭地区 漠河县"
"澳门特别行政区 离岛 -"
Random.zip()
Data Template
// Random.zip()
Random.zip()
Mock.mock('@zip')
Mock.mock('@zip()')
Result
// Random.zip()
"148339"
"473824"
"688782"
[](javascript:;)
[](javascript:;)
Helper
Random.capitalize( word )
Data Template
// Random.capitalize( word )
Random.capitalize('hello')
Mock.mock('@capitalize("hello")')
Result
// Random.capitalize( word )
"Hello"
"Hello"
[](javascript:;)
[](javascript:;)
Random.upper( str )
Data Template
// Random.upper( str )
Random.upper('hello')
Mock.mock('@upper("hello")')
Result
// Random.upper( str )
"HELLO"
"HELLO"
[](javascript:;)
[](javascript:;)
Random.lower( str )
Data Template
// Random.lower( str )
Random.lower('HELLO')
Mock.mock('@lower("HELLO")')
Result
// Random.lower( str )
"hello"
"hello"
[](javascript:;)
[](javascript:;)
Random.pick( arr )
Data Template
// Random.pick( arr )
Random.pick(['a', 'e', 'i', 'o', 'u'])
Mock.mock('@pick(["a", "e", "i", "o", "u"])')
Result
// Random.pick( arr )
"e"
"a"
[](javascript:;)
[](javascript:;)
Random.shuffle( arr )
Data Template
// Random.shuffle( arr )
Random.shuffle(['a', 'e', 'i', 'o', 'u'])
Mock.mock('@shuffle(["a", "e", "i", "o", "u"])')
Result
// Random.shuffle( arr )
["o","a","i","u","e"]
["e","o","i","a","u"]
[](javascript:;)
[](javascript:;)
Miscellaneous
Random.guid()
Data Template
// Random.guid()
Random.guid()
Mock.mock('@guid')
Mock.mock('@guid()')
Result
// Random.guid()
"67C9abE6-A7Ff-a4CE-54FB-B55DfC0Fed7f"
"53BF569F-b6B9-3Cc0-FF1c-d49cfbc7f041"
"f9eDA3BE-5fE2-7D7b-F3EB-621ea643cB35"
[](javascript:;)
[](javascript:;)
Random.id()
Data Template
// Random.id()
Random.id()
Mock.mock('@id')
Mock.mock('@id()')
Result
// Random.id()
"350000200508144563"
"330000199507197832"
"210000199602188224"
[](javascript:;)
[](javascript:;)
Random.increment( step? )
Data Template
// Random.increment()
Random.increment()
Mock.mock('@increment')
Mock.mock('@increment()')
// Random.increment( step )
Random.increment(100)
Mock.mock('@increment(100)')
Random.increment(1000)
Mock.mock('@increment(1000)')
Result
// Random.increment()
1
2
3
// Random.increment( step )
103
203
1203
2203