-
-
Notifications
You must be signed in to change notification settings - Fork 949
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into chore/contributing-data
- Loading branch information
Showing
141 changed files
with
1,338 additions
and
1,576 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,18 +6,12 @@ Using Faker is as easy as importing it from `@faker-js/faker`. | |
|
||
```js | ||
import { faker } from '@faker-js/faker'; | ||
// or, if desiring only a specific locale | ||
// import { faker } from '@faker-js/faker/locale/de' | ||
// or, if desiring a different locale | ||
// import { fakerDE as faker } from '@faker-js/faker' | ||
const randomName = faker.person.fullName(); // Rowan Nikolaus | ||
const randomEmail = faker.internet.email(); // [email protected] | ||
``` | ||
|
||
:::tip Note | ||
Using the first import statement will load every locale into memory. | ||
As such, start-up times and performance may be slow. | ||
Thus, by declaring a locale in the import, one can increase performance and reduce the time on start-up. | ||
::: | ||
|
||
Or if you're using CommonJS: | ||
|
||
```js | ||
|
@@ -27,6 +21,8 @@ const randomName = faker.person.fullName(); // Rowan Nikolaus | |
const randomEmail = faker.internet.email(); // [email protected] | ||
``` | ||
|
||
For more information about changing and customizing the locales, please refer to our [Localization Guide](localization). | ||
|
||
## Browser | ||
|
||
```html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.