aboutsummaryrefslogtreecommitdiff
path: root/docs/guide
diff options
context:
space:
mode:
authorMatt Mayer <[email protected]>2022-08-09 21:33:47 +0700
committerGitHub <[email protected]>2022-08-09 16:33:47 +0200
commitdddebeb7e5125c720db3732b1d0348ff3eb50bea (patch)
tree4d6d38c79b57bf292c18fcd830aa91ce06172aeb /docs/guide
parente1905064091acc9e56a895bc2555803fc97bb08c (diff)
downloadfaker-dddebeb7e5125c720db3732b1d0348ff3eb50bea.tar.xz
faker-dddebeb7e5125c720db3732b1d0348ff3eb50bea.zip
docs: improve getting started (#1247)
Diffstat (limited to 'docs/guide')
-rw-r--r--docs/guide/index.md8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/guide/index.md b/docs/guide/index.md
index f83966b7..0f1db38d 100644
--- a/docs/guide/index.md
+++ b/docs/guide/index.md
@@ -43,8 +43,10 @@ pnpm add @faker-js/faker --save-dev
```js
import { faker } from '@faker-js/faker';
+// or, if using CommonJS
+// const { faker } = require('@faker-js/faker');
-const randomName = faker.name.findName(); // Rowan Nikolaus
+const randomName = faker.name.fullName(); // Rowan Nikolaus
const randomEmail = faker.internet.email(); // [email protected]
```
@@ -55,7 +57,7 @@ const randomEmail = faker.internet.email(); // [email protected]
<script>
// Caitlyn Kerluke
- const randomName = faker.name.findName();
+ const randomName = faker.name.fullName();
const randomEmail = faker.internet.email();
@@ -76,7 +78,7 @@ const randomEmail = faker.internet.email(); // [email protected]
```
:::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"`.
+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"`.
:::
#### Alternative CDN links