Skip to content

SimpleProgrammingAU/nihon-numbers

Repository files navigation

nihon-numbers

Node.js CI/CD GitHub issues NPM Licence npm bundle size npm total downloads npm version

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

About

A lightweight module to convert numbers from Arabic to Japanese characters.

Resources

License

Stars

Watchers

Forks

Packages

No packages published