---
# System prepended metadata

title: Modularized Faker Proposal

---

# Modularized Faker Proposal

Split each individual method within a module to a separate file, e.g.
- src
  - other folders
  - modules
    - address
      - city.ts
      - street.ts
      - etc
    - internet
      - url.ts
      - etc
    - etc

In order to keep consistency, the `test` folder should be reorganized in much the same way, e.g.
- test
  - other folders
  - modules
    - address
      - city.spec.ts
      - street.spec.ts
      - etc
    - internet
      - url.spec.ts
      - etc
    - other modules

This can be done with the addition of a new module folder in the `test` directory, subfolders for each module, and a `.spec.ts` file for each individual function.

Each module should have its own nested namespace in the package, such that methods within the module could be used like this:

```ts
import { pin } from '@faker-js/faker/finance'
import { commitEntry } from '@faker-js/faker/git'
```

Not too sure how we could make this work with the current class system and locale-dependent methods yet

