Skip to content

Commit c80e772

Browse files
authored
docs: fix faker uuid usage (#312)
1 parent 84d529e commit c80e772

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ import { faker } from '@faker-js/faker'
7373

7474
factory({
7575
user: {
76-
id: primaryKey(faker.datatype.uuid),
76+
id: primaryKey(faker.string.uuid),
7777
},
7878
})
7979
```
8080

81-
> Each time a new `user` is created, its `user.id` property is seeded with the value returned from the `datatype.uuid` function call.
81+
> Each time a new `user` is created, its `user.id` property is seeded with the value returned from the `string.uuid` function call.
8282
8383
Once your data is modeled, you can use [Model methods](#model-methods) to interact with it (create/update/delete). Apart from serving as interactive, queryable fixtures, you can also [integrate your data models into API mocks](#usage-with-api-mocks) to supercharge your prototyping/testing workflow.
8484

@@ -987,7 +987,7 @@ faker.seed(123)
987987

988988
factory({
989989
user: {
990-
id: primaryKey(faker.datatype.uuid),
990+
id: primaryKey(faker.string.uuid),
991991
firstName: faker.name.firstName,
992992
},
993993
})

0 commit comments

Comments
 (0)