Skip to content
/ JpNum Public

Converts between Arabic numbers and Japanese numbers (it is called 漢数字).

License

Notifications You must be signed in to change notification settings

remew/JpNum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JpNum

Converts between Arabic numbers and Japanese numbers (it is called 漢数字).

Installation

$ npm install jp-num --save

Example

const {toArabic, toJapanese} = require('jp-num');

console.log(toArabic('四十二')); // => '42'
console.log(toJapanese('42')); // => '四十二'
console.log(toArabic('一無量大数'); // => '100000000000000000000000000000000000000000000000000000000000000000000'

if you want to use either toArabic or toJapanese only, you can write like this.

// only `toArabic`
const toArabic = require('jp-num/toArabic');

// only `toJapanese`
const toJapanese = require('jp-num/toJapanese');

License

MIT License

About

Converts between Arabic numbers and Japanese numbers (it is called 漢数字).

Resources

License

Stars

Watchers

Forks

Packages

No packages published