TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Faker.js - generate massive amounts of fake data in the browser and Node.js

107 点作者 daGrevis大约 12 年前

12 条评论

DanBC大约 12 年前
This is cool.<p>I'm gently disturbed that it generates valid email addresses. You pick a random name, follow it with an @, then add a random word, and then add a TLD. Obviously you're not responsible for how people use the tool.<p>Best practice would be to use the domain example.com
评论 #5380189 未加载
评论 #5384207 未加载
fruchtose大约 12 年前
Great project! I would, however, recommend an API with more namespaces. Functions like Address.ukCounty don't sit well with me; such an API would be a mess if you added support for countries other than the US and the UK. You could (and probably create namespaces for each country code, e.g.:<p><pre><code> Address |-&#62; US |-&#62; state |-&#62; UK |-&#62; state </code></pre> An alternative would be for country-specific generators to take a country code as an argument. I am not an experienced API designer, though, so take my comments with a heaping of salt.
qwerty69大约 12 年前
Very nice library. It would be nice to add the ability to generate random values based on a distribution, e.g. the values are random but correspond to a normal distribution with a given mean and standard deviation. This would be very useful for testing statistical libraries and applications.
评论 #5379914 未加载
mindcrime大约 12 年前
Obligatory "I wrote something similar" post. But my tool is written in Java, doesn't run in the browser, but does use @example.com for the email addresses.<p><a href="https://github.com/mindcrime/dummydatagenerator" rel="nofollow">https://github.com/mindcrime/dummydatagenerator</a>
revorad大约 12 年前
This is fantastic. I was actually looking for something like this to test some APIs with dummy data.
评论 #5380221 未加载
justwrote大约 12 年前
Shameless plug: I also created a similar library for Scala some time ago <a href="https://github.com/justwrote/scala-faker" rel="nofollow">https://github.com/justwrote/scala-faker</a><p>Need to update to 2.10 soon :)
schumacher大约 12 年前
Cool. I recently build a similar thing for Magento to provide demo data and for anonymization purposes. Some parts of faker.js needs sure refactorings ...
评论 #5380292 未加载
webfuel大约 12 年前
Thanks! I won't be using <a href="http://www.fakenamegenerator.com/" rel="nofollow">http://www.fakenamegenerator.com/</a> as much now.
DoubleCluster大约 12 年前
What's the use case for this? To annoy spammers?
评论 #5379995 未加载
评论 #5380018 未加载
评论 #5379816 未加载
hawkw大约 12 年前
So many Node.js libraries....
tonyblundell大约 12 年前
Great, thanks!
robbyishere大约 12 年前
anjuna.js