1.0.0 • Published 5 years ago
numeral-prefix v1.0.0
Numeral Prefix
A function to generate greek-derived numeral prefixes from a plain number.
Install
npm install numeral-prefixUsage
const numeralPrefix = require('numeral-prefix');
console.log(numeralPrefix(5, 'gon'));
// => pentagon
console.log(numeralPrefix(12, 'gon'));
// => dodecagon
console.log(numeralPrefix(2048, 'gon'));
// => dischiliatetracontakaioctagonnumeralPrefix(number, suffix)
Generates a greek-derived numeral prefix based on the given number and appends the suffix.
number
Type: Number
Number to generate the prefix from.
suffix
Type: String
Default: ''
Suffix to append to the generated numeral prefix.
Contributing
Contributions are always welcome! Please run npm test beforehand to ensure everything is ok.
Support
If you use this package please consider starring it :)
1.0.0
5 years ago