MCPcopy Create free account
hub / github.com/boringstack-xyz/boringstack / toSingularEntity

Function toSingularEntity

apps/api/scripts/codegen/new-resource.ts:51–52  ·  view source on GitHub ↗
(pascal: string)

Source from the content-addressed store, hash-verified

49 pascal.charAt(0).toLowerCase() + pascal.slice(1);
50
51const toSingularEntity = (pascal: string): string =>
52 pascal.length > 1 && pascal.endsWith("s") ? pascal.slice(0, -1) : pascal;
53
54const APP_SCHEMA_HEADER = `import {
55 foreignKey,

Callers 1

new-resource.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected