diff options
| author | Jacek Fiszer <[email protected]> | 2022-01-25 19:17:22 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-01-25 19:17:22 +0100 |
| commit | 2c82be67c4ceb6afb3ae07b8a422fcc9be7c409b (patch) | |
| tree | be721deff2d635bffff561dd75d1f04c9dd7cf4c /docs | |
| parent | a895ae564541dc72ffa8c2d1620bcf838be23dd3 (diff) | |
| download | faker-2c82be67c4ceb6afb3ae07b8a422fcc9be7c409b.tar.xz faker-2c82be67c4ceb6afb3ae07b8a422fcc9be7c409b.zip | |
docs: add Deno use case (#283)
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/guide/index.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/guide/index.md b/docs/guide/index.md index 06044701..bab3aea8 100644 --- a/docs/guide/index.md +++ b/docs/guide/index.md @@ -71,6 +71,20 @@ const randomCard = faker.helpers.createCard(); // An object representing a rando 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 Faker in your web app.** ::: +### Deno + +```js +import { faker } from "https://cdn.skypack.dev/@faker-js/faker"; + +const randomName = faker.name.findName(); // Willie Bahringer +const randomEmail = faker.internet.email(); // [email protected] +const randomCard = faker.helpers.createCard(); // random contact card containing many properties +``` + +:::tip Note +It is highly recommended to use version tags when importing libraries in Deno, e.g: `import { faker } from "https://cdn.skypack.dev/@faker-js/[email protected]"`. Add `?dts` to import with type definitions: `import { faker } from "https://cdn.skypack.dev/@faker-js/[email protected]?dts"`. +::: + ## Community If you have questions or need help, reach out to the community via [Discord](https://discord.com/invite/4qDjAmDj4P) and [GitHub Discussions](https://github.com/faker-js/faker/discussions). |
