
Faker.js – generate fake data in the browser and Node - tilt
https://github.com/Marak/faker.js
======
Raed667
This reminds me of an old project of mine[0], this generates Arabic names.

[0]
[https://github.com/RaedsLab/Tunisian_Name_Generator](https://github.com/RaedsLab/Tunisian_Name_Generator)

~~~
aagha
Curious why you made this. Just checked it out. Why the phone number?

------
donskif
I've been using this in conjunction with chance.js making it very easy to
generate complex data sets

[http://chancejs.com/](http://chancejs.com/)

------
tawrahim
This looks interesting and very useful. However my only question is what is
the license of those generated avatar?

~~~
unindented
The avatars come from UI Faces: [http://uifaces.com/](http://uifaces.com/)

You have to give your consent in order to appear there.

------
msluyter
I used this at one point when I needed a large synthetic "customer" dataset,
and found the sample size to be somewhat limited. I had to munge first/last
names with added random characters. But looking at it now, it appears that's
improved. For example, there are about 3000x500 first/last name combinations,
for a total of about 1.5M possible full names (for en_US). However, if you
need, say, as many unique last names as possible, 500 might still be too few.
Still, a nice project.

~~~
_Marak_
Faker.js now supports something like 30+ locales.

This should expand the amount of name combinations considerably.

------
ing33k
for PHP
[https://github.com/fzaninotto/Faker](https://github.com/fzaninotto/Faker)

------
jimniels
I always liked this library. Wrote a tutorial around the concept of it on
websesign tuts a few years back, though I'm not sure how dated it is in
relation to the API now ([http://webdesign.tutsplus.com/tutorials/filler-
content-tools...](http://webdesign.tutsplus.com/tutorials/filler-content-
tools-tips-and-a-dynamic-example--webdesign-12258)). Anyway, it deals with one
way the library could be used in the browser, in combination with other filler
content services, to aid "designing" in the browser.

------
rogeryu
Why would I want to use this? Is this for test data or for obfuscation?

~~~
diggan
Could be used for both. I've used it for generating test data in
unit/integration tests and also for obfuscation where production-dumps are
needed.

It's useful for having in development as well, when you need to have X number
of forms and X number of users but you don't want to have to manually create
that every time you re-create the environment.

------
dmitriiabramov1
It can help a lot when writing UI/Selenium tests with mocked/fake backend (as
long as the application data model is well defined). i also wrote a similar
library around es6 generators that defines application data structures as
plain JS objects and generates data objects out of it using fake random data
[https://github.com/dmitriiabramov/sharkhorse](https://github.com/dmitriiabramov/sharkhorse)

------
michaelmior
Faker.js is pretty great. I wrote a simple package to generate fake data for
MySQL tables. It's rather basic, but it's been useful to me. It probably
wouldn't be hard to stick a DB abstraction layer in front to use with other
backends.

[https://github.com/michaelmior/mysql-
faker](https://github.com/michaelmior/mysql-faker)

~~~
wesleytodd
Similarly I wrote a tool that uses Faker to generate api fixtures :) Why go
stright to the DB when you can test your api at the same time?

[https://github.com/MusicMapIo/Mokr](https://github.com/MusicMapIo/Mokr)

------
domlebo70
Good idea. Can anyone comment on this vs traditional QuickCheck like tools? We
use property-based testing as our default. It seems like Faker is a less
composable version.

------
idoco
+1 for using hook.io for the hosted API. I just love this service and think
this is a great use case for it. Will support it on kickstarter.

~~~
k__
Hook.io is still a thing? I didn't hear anything about it after the drama back
in the days.

~~~
idoco
Until I googled it just now, I actually didn't know about this whole drama.
I've been using it for the last year and had a really good experience.

(Drama:
[https://groups.google.com/forum/#!topic/nodejs/Rl3drk9YQ_Q](https://groups.google.com/forum/#!topic/nodejs/Rl3drk9YQ_Q))

~~~
k__
Nice to know.

I used it for a project before the drama and switched to vert.x after it.

------
stincity
The age and avatar are not at all synced. Just a heads up if you're gonna be
using this outside of testing.

------
bahmutov
The only one anyone needs - is the list of fake todos, generated using
[https://github.com/bahmutov/fake-todos](https://github.com/bahmutov/fake-
todos)

See demo at [http://glebbahmutov.com/fake-
todos/](http://glebbahmutov.com/fake-todos/)

~~~
TuringTest
"avoid cleaning bird" was in my fake list. I don't know whether it looks
disturbing or nonsensical.

