5 ms·
Faker.js – generate fake data in the browser and Node
- donskif 11y agoI've been using this in conjunction with chance.js making it very easy to generate complex data sets http://chancejs.com/ http://chancejs.com/
- jimniels 11y agoI 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-tips-and-a-dynamic-example--webdesign-12258 http://webdesign.tutsplus.com/tutorials/filler-content-tools...). 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.
- idoco 11y ago+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__ 11y agoHook.io is still a thing? I didn't hear anything about it after the drama back in the days.
- idoco 11y agoUntil 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__ 11y agoNice to know. I used it for a project before the drama and switched to vert.x after it.
- rogeryu 11y agoWhy would I want to use this? Is this for test data or for obfuscation?
- diggan 11y agoCould 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.
- ing33k 11y agowe use it for writing fixtures for tests
- UserRights 11y agopeople use it for building dating sites.
- brianfryer 11y agoWriting mock APIs for front-end dev.
- atom-morgan 11y agoI'm currently using it to mock my API responses for a front-end application.
- michaelmior 11y agoI used this to generate test data for application benchmarking. That is, when I wanted real-ish data to test scalability.
- Jean-Philipe 11y agoSo our front-end devs can try their interface designs with different data.
- Raed667 11y agoThis 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 11y agoCurious why you made this. Just checked it out. Why the phone number?
- ing33k 11y agofor PHP https://github.com/fzaninotto/Faker https://github.com/fzaninotto/Faker
- tawrahim 11y agoThis looks interesting and very useful. However my only question is what is the license of those generated avatar?
- unindented 11y agoThe avatars come from UI Faces: http://uifaces.com/ http://uifaces.com/ You have to give your consent in order to appear there.
- michaelmior 11y agoFaker.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 11y agoSimilarly 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
- bahmutov 11y agoThe 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 11y ago"avoid cleaning bird" was in my fake list. I don't know whether it looks disturbing or nonsensical.
- stincity 11y agoThe age and avatar are not at all synced. Just a heads up if you're gonna be using this outside of testing.
- msluyter 11y agoI 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_ 11y agoFaker.js now supports something like 30+ locales. This should expand the amount of name combinations considerably.
- dmitriiabramov1 11y agoIt 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
- deleted 11y ago[deleted]
- domlebo70 11y agoGood 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.
- deleted 11y ago[deleted]