-
-
Notifications
You must be signed in to change notification settings - Fork 177
feat(concerto-util): add MonetaryUtil support #1102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Aadityavardhan Singh <[email protected]>
packages/concerto-util/package.json
Outdated
| "dependencies": { | ||
| "@supercharge/promise-pool": "1.7.0", | ||
| "debug": "4.3.7", | ||
| "n2words": "^3.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use a pinned/exact package version to prevent supply chain attacks.
dselman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - just one small change required for the dependency on n2words. Can you also check that this webpacks ok and the increase in the bundle size?
Signed-off-by: Aadityavardhan Singh <[email protected]>
|
Fixed! I've pinned the n2words dependency to version 3.0.0. I also ran the build locally to verify the bundle size: Ready for review! |
|
Please address the build failures. |
Signed-off-by: Aadityavardhan Singh <[email protected]>
Signed-off-by: Aadityavardhan Singh <[email protected]>
Signed-off-by: Aadityavardhan Singh <[email protected]>
|
@dselman Done! Ready for review |
|
This PR is stale because it has been open 15 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
Description
This PR adds a new
MonetaryUtilclass to the@accordproject/concerto-utilpackage. This utility provides functionality to convert numbers into their written word representation (e.g., converting100to"one hundred"), utilizing then2wordslibrary.Motivation
As discussed in the previous meeting, there is a need for monetary text conversion support within the library to facilitate the upcoming implementation of the
Monetarytype in the core model. This utility lays the groundwork for that feature.Changes
lib/monetary.jscontaining theMonetaryUtilclass.n2wordstopackage.json.MonetaryUtilviaindex.jsfor external consumption.Verification
Next Steps
Once merged, this utility will be used by the
concerto-corelogic to handle monetary serialization and human-readable formatting.