(
options: {
version?: 4 | 7;
refDate?: string | Date | number;
} = {}
)
| 776 | refDate?: string | Date | number; |
| 777 | }): string; |
| 778 | uuid( |
| 779 | options: { |
| 780 | version?: 4 | 7; |
| 781 | refDate?: string | Date | number; |
| 782 | } = {} |
| 783 | ): string { |
| 784 | const { version = 4, refDate = this.faker.defaultRefDate() } = options; |
| 785 | switch (version) { |
| 786 | case 7: { |
| 787 | return uuidV7(this.faker, toDate(refDate)); |
| 788 | } |
| 789 | |
| 790 | default: { |
| 791 | return uuidV4(this.faker); |
| 792 | } |
| 793 | } |
| 794 | } |
| 795 | |
| 796 | /** |
| 797 | * Returns a ULID ([Universally Unique Lexicographically Sortable Identifier](https://github.com/ulid/spec)). |
no test coverage detected