Skip to content

Add case rewrites #1

@dominnya

Description

@dominnya

Automatically convert case to kebab-case as in:

src/routes/threeWordsPath.get.ts -> GET /three-words-path
src/routes/ThreeWordsPath.get.ts -> GET /three-words-path
src/routes/three-words-path.get.ts -> GET /three-words-path
src/routes/three_words_path.get.ts -> GET /three-words-path

Along with that add an option to disable that feature as in:

const app = express();

createRouter(app, {
  // or case: "snake" | "kebab" | "pascal" | "camel" | "lower" | "upper"
  case: false,
});

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions