Skip to content

Commit

Permalink
#140 allow schema names that end with numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
eluce2 committed Aug 19, 2024
1 parent eaba131 commit acd66f2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/little-buses-type.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@proofgeist/fmdapi": patch
---

codegen: allow schema names that end with numbers
3 changes: 1 addition & 2 deletions src/utils/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ type TSchema = {
values?: string[];
};

const varname = (name: string) =>
name.replace(/[^a-zA-Z_]+|[^a-zA-Z_0-9]+/g, "");
const varname = (name: string) => name.replace(/[^a-zA-Z0-9_]/g, "");

const commentHeader = `
/**
Expand Down

0 comments on commit acd66f2

Please sign in to comment.