英文:
Is it safe to use fakerjs in production? Or any alternative?
问题
我正在使用fakerjs来测试我的React应用程序。
一些随机函数,比如生成随机颜色、头像或数字,非常有用。我想在生产业务逻辑中也使用这些随机函数。这样做安全吗?
还是我应该只是将代码从存储库复制到我的自己的代码中?
还有没有其他安全用于生成随机值的替代方法?
英文:
I'm using fakerjs for testing my React app.
Some of the random function like generating random colors or avatars or numbers are very useful. I'd like to use these random functions in production bussiness logic too.
Is it safe to do that?
Or should I just copy the codes from the repo to my own codes?
Or is there any alternative for generating random values that safe to use in production?
答案1
得分: 2
尽管过去关于 Faker 存在争议(链接),但 Faker.js 现在是一个由社区控制的项目,可以安全使用。
链接:
英文:
Although there was controversies around Faker in the past (Link), Faker.js is now a community controlled project and is safe to use.
Links:
答案2
得分: 1
I just built one of my projects 2 times.
- without including
faker.js
- including
faker.js
第二次它的大小增加了超过2.5MB
import cost vs extension也表明如此
So, I would like to copy the relevant code from the repo.
英文:
I just built one of my projects 2 times.
- without including
faker.js
- including
faker.js
2nd time it gets bigger more than 2.5MB
import cost vs extension also says that
So, I would like to copy the relevant code from the repo.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论