Skip to content

Commit 4f67aec

Browse files
committed
Use "randomUUID" from Crypto instead
1 parent be6cba9 commit 4f67aec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/crud.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ScanOptions } from './dynamo-scanner.js';
44
import { UpdateItemOptions } from './dynamo-updater.js';
55
import { TableDefinition } from './table-builder/table-definition.js';
66
import { TableClient } from './table-client.js';
7-
import { v4 as uuid } from 'uuid';
7+
import { randomUUID } from 'node:crypto';
88
import { JsonPath } from './types/index.js';
99

1010
export type ProjectionOrTypeArray<PROJECTION, TableType> =
@@ -42,7 +42,7 @@ export class Crud<TableConfig extends TableDefinition> {
4242
async create(
4343
item: Omit<TableConfig['type'], TableConfig['keyNames']['partitionKey']>,
4444
): Promise<TableConfig['type']> {
45-
const identifier = uuid();
45+
const identifier = randomUUID();
4646
const actualItem = {
4747
[this.tableClient.tableConfig.keyNames.partitionKey]: identifier,
4848
...item,

0 commit comments

Comments
 (0)