nihon-numbers
v1.0.13
Published
A lightweight module to convert numbers from Arabic to Japanese characters.
Downloads
11
Maintainers
Readme
nihon-numbers
A lightweight module to convert numbers from Arabic to Japanese characters.
Installation
npm install --save nihon-numbers
API
processNumber(number)
Converts the input number into Japanese characters.
Arguments
number: number
: The input integer to convert. Note: any decimal values will be rounded down.
Returns
string
: The character representation of the input number.
Usage
import { default as processNumber } from 'nihon-numbers';
const number = processNumber(3800);
console.log(number); //Outputs: 三千八百
Test
npm run test