Skip to content

feat(routes-f): Number-to-Words Converter API (#589)#605

Open
TochukwuJustice wants to merge 1 commit intoStreamFi-x:devfrom
TochukwuJustice:fix/converter-route
Open

feat(routes-f): Number-to-Words Converter API (#589)#605
TochukwuJustice wants to merge 1 commit intoStreamFi-x:devfrom
TochukwuJustice:fix/converter-route

Conversation

@TochukwuJustice
Copy link
Copy Markdown

closes #589
Summary of Changes Implemented a new API route GET /api/routes-f/num-to-words that converts integers into English word representations.

Core Logic: Added a high-performance recursive algorithm in _lib/converter.ts supporting numbers up to ±1 quadrillion.
Styles: Full support for both cardinal (default) and ordinal (first, second, etc.) styles.
Validation: Enforces integer types and range limits with descriptive error messages.
Tests: Included unit tests covering zero, negative integers, boundary values, and complex ordinal transformations (e.g., twelfth, twentieth).
Reason for Changes Fulfills the requirements for issue #589. This provides a production-grade utility for human-readable number conversion, strictly scoped within the routes-f directory for modularity and independence.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 24, 2026

@TochukwuJustice is attempting to deploy a commit to the david's projects Team on Vercel.

A member of the Team first needs to authorize it.

@TochukwuJustice
Copy link
Copy Markdown
Author

can you merge asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(routes-f): number-to-words converter (cardinal and ordinal)

1 participant