TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Generate Fake Data for Your JavaScript Applications Using Faker

6 pointsby rakeshmenonover 10 years ago

2 comments

e28etaover 10 years ago
I&#x27;ve done something similar at work, primarily to generate random data that&#x27;ll pass our validation checks (real cities, valid SSN, etc).<p>It seems strange to me that the email address and usernames in the samples are based on a person&#x27;s name, but they&#x27;re different from the user&#x27;s actual name.<p>I chose to just take the name, and transform it for the email address. I think some consistency will make it easier to test that the right user data shows up in the right places while testing.
评论 #8943602 未加载
elliotecover 10 years ago
I&#x27;ve used Faker and like it. For mocking big datasets I prefer <a href="http://www.mockaroo.com/" rel="nofollow">http:&#x2F;&#x2F;www.mockaroo.com&#x2F;</a> served by <a href="https://github.com/typicode/json-server" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;typicode&#x2F;json-server</a>
评论 #8943448 未加载