Skip to content

Commit

Permalink
fix: wrap properties beginning with a number in quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
tillschweneker authored and astahmer committed Dec 5, 2023
1 parent 9148f79 commit 95a8e85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function normalizeString(text: string) {
}

export const wrapWithQuotesIfNeeded = (str: string) => {
if (/^\w+$/.test(str)) {
if (/^[a-zA-Z]\w*$/.test(str)) {
return str;
}

Expand Down

0 comments on commit 95a8e85

Please sign in to comment.