
Security News
Static vs. Runtime Reachability: Insights from Latio’s On the Record Podcast
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
numeral-v2
Advanced tools
A javascript library for formatting and manipulating numbers.
This Repository is forked from Numeral.js.
develop
branch. All pull requests must include the appropriate tests.Fork the library
Run npm install
to install dependencies
Create a new branch from develop
Add your tests to the files in /tests
To test your tests, run grunt
When all your tests are passing, run grunt dist
to compile and minify all files
Submit a pull request to the develop
branch.
Formats now exist in their own files and act more or less as plugins. Check out the bytes format for an example of how to create one.
When naming locale files use the ISO 639-1 language codes supplemented by ISO 3166-1 country codes when necessary.
See the english unit tests for an example.
Added abbreviations for thousands and millions using 'a' in the format
numeral.register('locale', 'in', {
delimiters: {
thousands: ',',
decimal: '.'
},
trillion: 1000000000,
billion: 10000000,
million: 100000
})
numeral.register('locale', 'in', {
delimiters: {
thousands: ',',
decimal: '.'
},
trillion: 1000000000,
billion: 10000000,
million: 100000,
regex: /(\d)(?=(\d\d)+\d$)/g,
})
Input - numeral(1290704).format("0,00")
Output - 12,90,704
numeral.register('locale', 'in', {
delimiters: {
thousands: ',',
decimal: '.'
},
trillion: 1000000000,
billion: 10000000,
million: 100000,
regex: /(\d)(?=(\d\d)+\d$)/g,
abbreviations: {
thousand: 'k',
million: 'l',
billion: 'cr',
trillion: 'a'
},
abbreviations_detail: {
thousand: 2,
million: 5,
billion: 7,
trillion: 9
}
})
FAQs
Format and manipulate numbers.
The npm package numeral-v2 receives a total of 16 weekly downloads. As such, numeral-v2 popularity was classified as not popular.
We found that numeral-v2 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.