numeral-prefix
v1.0.0
Published
Library to generate greek-derived numeral prefixes from a plain number
Downloads
31
Maintainers
Readme
Numeral Prefix
A function to generate greek-derived numeral prefixes from a plain number.
Install
npm install numeral-prefix
Usage
const numeralPrefix = require('numeral-prefix');
console.log(numeralPrefix(5, 'gon'));
// => pentagon
console.log(numeralPrefix(12, 'gon'));
// => dodecagon
console.log(numeralPrefix(2048, 'gon'));
// => dischiliatetracontakaioctagon
numeralPrefix(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 :)