A lot of effort has been put into Faker
to create a useful and handy library.
There are still a lot of things to be done, so all contributions are welcome!
If you want to make Faker
a better, please read the following contribution guide.
- Please make sure that you run
pnpm install
,pnpm run build
andpnpm run test
before making a PR to ensure that everything is working from the start.
- The project is being built by esbuild (see bundle.ts)
- The documentation is running via VitePress.
Make sure you build the project before running the docs, cause some files depend on
dist
. Usepnpm run docs:dev
to edit them in live mode. - The tests are executing
vitest
againsttest/**/*.spec.ts
- If you update the locales, make sure to run
pnpm run generate:locales
to generate/update the related files.
The sources are located in the src directory. All fake data generators are divided into namespaces (each namespace being a separate module). Most of the generators use the definitions, which are just plain JavaScript objects/arrays/strings that are separate for each locale.