Search code examples
reactjsfaker.js

Is it safe to use fakerjs in production? Or any alternative?


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?


Solution

  • I just built one of my projects 2 times.

    1. without including faker.js
    2. including faker.js

    enter image description here

    2nd time it gets bigger more than 2.5MB

    import cost vs extension also says that

    enter image description here

    So, I would like to copy the relevant code from the repo.