-
-
Notifications
You must be signed in to change notification settings - Fork 943
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 infra/unicorn/numeric-separators-style
- Loading branch information
Showing
61 changed files
with
958 additions
and
349 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
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 |
---|---|---|
|
@@ -26,10 +26,22 @@ const randomEmail = faker.internet.email(); // [email protected] | |
|
||
::: | ||
|
||
For more information about changing and customizing the locales, please refer to our [Localization Guide](localization). | ||
For more information on selecting and customizing a locale, please refer to our [Localization Guide](localization). | ||
|
||
## Browser | ||
|
||
If you want to try it yourself, you can open your browser console via `Ctrl + Shift + J` / `F12`. | ||
|
||
```js | ||
const { faker } = await import('https://esm.sh/@faker-js/faker'); | ||
|
||
const randomName = faker.person.fullName(); // Amber Keebler | ||
const randomEmail = faker.internet.email(); // [email protected] | ||
``` | ||
|
||
Some websites may have protections against downloading external code, dev servers usually work fine. | ||
As an alternative, you can create a simple html file and open it with your browser: | ||
|
||
```html | ||
<script type="module"> | ||
import { faker } from 'https://esm.sh/@faker-js/faker'; | ||
|
@@ -39,11 +51,17 @@ For more information about changing and customizing the locales, please refer to | |
// [email protected] | ||
const randomEmail = faker.internet.email(); | ||
document.getElementById('name').value = randomName; | ||
document.getElementById('email').value = randomEmail; | ||
</script> | ||
|
||
<input id="name" /> | ||
<input id="email" /> | ||
``` | ||
|
||
::: info Note | ||
Using the browser is great for experimenting 👍. However, due to all of the strings Faker uses to generate fake data, **Faker is a large package**. It's `> 5 MiB` minified. **Please avoid deploying the full Faker in your web app.** | ||
Using the browser is great for experimenting 👍. However, due to all of the strings Faker uses to generate fake data, **Faker is a large package**. It's `> 5 MiB` minified. **Please avoid deploying the full Faker package in your web app.** | ||
::: | ||
|
||
## CDN/Deno | ||
|
@@ -56,7 +74,7 @@ const randomEmail = faker.internet.email(); // [email protected] | |
``` | ||
|
||
::: info Note | ||
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://esm.sh/@faker-js/[email protected].0"`. | ||
It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://esm.sh/@faker-js/[email protected].1"`. | ||
::: | ||
|
||
### Alternative CDN links | ||
|
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 |
---|---|---|
|
@@ -97,7 +97,7 @@ | |
"@eslint-types/prettier": "5.1.3", | ||
"@eslint-types/typescript-eslint": "7.5.0", | ||
"@eslint-types/unicorn": "52.0.0", | ||
"@types/node": "20.12.11", | ||
"@types/node": "20.12.12", | ||
"@types/sanitize-html": "2.11.0", | ||
"@types/semver": "7.5.8", | ||
"@types/validator": "13.11.10", | ||
|
@@ -106,7 +106,7 @@ | |
"@vitest/coverage-v8": "1.6.0", | ||
"@vitest/ui": "1.6.0", | ||
"@vueuse/core": "10.9.0", | ||
"cypress": "13.9.0", | ||
"cypress": "13.10.0", | ||
"eslint": "8.57.0", | ||
"eslint-config-prettier": "9.1.0", | ||
"eslint-define-config": "2.1.0", | ||
|
@@ -116,7 +116,7 @@ | |
"eslint-plugin-prettier": "5.1.3", | ||
"eslint-plugin-unicorn": "52.0.0", | ||
"eslint-plugin-vitest": "0.4.1", | ||
"npm-run-all2": "6.1.2", | ||
"npm-run-all2": "6.2.0", | ||
"prettier": "3.2.5", | ||
"prettier-plugin-organize-imports": "3.2.4", | ||
"rimraf": "5.0.7", | ||
|
@@ -125,15 +125,15 @@ | |
"commit-and-tag-version": "12.4.1", | ||
"ts-morph": "22.0.0", | ||
"tsup": "8.0.2", | ||
"tsx": "4.10.1", | ||
"tsx": "4.11.0", | ||
"typescript": "5.4.5", | ||
"validator": "13.12.0", | ||
"vite": "5.2.11", | ||
"vitepress": "1.2.0", | ||
"vitepress": "1.2.2", | ||
"vitest": "1.6.0", | ||
"vue": "3.4.27" | ||
}, | ||
"packageManager": "[email protected].1", | ||
"packageManager": "[email protected].2", | ||
"engines": { | ||
"node": ">=18.0.0", | ||
"npm": ">=9.0.0" | ||
|
Oops, something went wrong.