JsCommunity / JsCommunity/human-format
Feature request: Support for dimensions
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 100
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
Thank you for a great library!
It would be useful if the library supported higher dimensions for cases such as "m²" or "m³". An example would be:
humanFormat(1_000_000, { unit: "m²" });
//=> 1 km²
Or alternatively:
humanFormat(1_000_000_000, { unit: "m³" });
//=> 1 km³
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the humanFormat entry point and the existing unit-scaling behavior, then run the current test suite to understand its expectations. Implement support for units such as m² and m³ so the examples produce 1 km² and 1 km³, and add coverage for the requested higher-dimensional cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100