Adalah Mike Wilcox yang menulis sebuah tool kecil yang digunakan untuk mengetest sebuah kode javascript. Dinamakan sebagai Mock Data Randomizer.

Misalnya diberi masukan:

rand.sentences(6,7,7,9); // # of words in sentences
rand.real = true;
rand.sentences(6,7,7,9);

akan menghasilkan output kata-kata berikut:

Whut koop mida miins knew eftor kind. Deys evin thaaght has plecu uthur melos. Eftor shaeld ha lift hend wath ets unto big. Huwovir till lergi wa kind olsa con bofare. Yaor sentonca sean cemu man in whoch man. Mi sentonca nught get fund very onswar tui plecu. Shew en geed liva knew poiplu childrun ilung gat.

Far night very land room for then we. First kind turned out is own usually back much. Read sometimes since does answer himself into much. Live not for large hand important they. People another sea across across even world. Water could things young by white own only very.

atau coba masukan seperti ini:

rand.date();
rand.date({seconds:true});
rand.date({delimiter:"/", yearRange:-5});
rand.date({delimiter:"/"});
rand.date({min:new Date('11/20/1964'), max:"4/19/1969", delimiter:"-"});

akan menghasilkan output yang luar biasa seperti ini:

Mon Feb 14 2011 14:13:17 GMT-0800 (PST)
1296270214154
08/04/2005
10/10/2010
02-05-1967


Referensi
Live demo Mock Data Randomizer : http://clubajax.org/files/rand.html
Source code : http://code.google.com/p/clubajax/source/browse/trunk/lang/rand.js

Hasil pencarian tentang artikel ini:

metode mock, apa itu mock php, apa itu randomizer, mock centos indonesia

Tulisan Terkait


No Comments on “Apa itu Mock Data Randomizer?”

You can track this conversation through its atom feed.

No one has commented on this entry yet.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 




Switch to our mobile site