Skip to content

Commit 7cba60f

Browse files
committed
chore: remove unused uuid
1 parent 9a8174d commit 7cba60f

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

pnpm-lock.yaml

Lines changed: 0 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/lexer.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
WRONG_KEY,
1010
} from './constants';
1111
import { parseKey } from './parser';
12-
import { v4 } from 'uuid';
1312
import { LexerResult, LexerType } from './types';
1413

1514
export const getNVTONType = (str: string): LexerType => {
@@ -27,7 +26,6 @@ const getCommonTypeCase = (str: string) => {
2726

2827
if (type === 'object' || type === 'default') {
2928
return {
30-
key: type === 'default' ? str : v4(),
3129
data: parseKey(str, type),
3230
type,
3331
};
@@ -49,7 +47,10 @@ export const lex = (raw: string): LexerResult => {
4947
.map((str) => {
5048
const def = getCommonTypeCase(str);
5149

52-
if (def !== true) return def;
50+
if (def !== true) return {
51+
key: str,
52+
...def
53+
};
5354

5455
if (!isTuple(str)) return [];
5556

0 commit comments

Comments
 (0)