diff --git a/.changeset/little-buses-type.md b/.changeset/little-buses-type.md new file mode 100644 index 0000000..519e4e2 --- /dev/null +++ b/.changeset/little-buses-type.md @@ -0,0 +1,5 @@ +--- +"@proofgeist/fmdapi": patch +--- + +codegen: allow schema names that end with numbers diff --git a/src/utils/codegen.ts b/src/utils/codegen.ts index 61dc37e..b4f49a1 100644 --- a/src/utils/codegen.ts +++ b/src/utils/codegen.ts @@ -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 = ` /**