hindu-numerals
v1.0.3
Published
A library to convert hindu numerals to arabic and vice versa
Downloads
15
Maintainers
Readme
A very basic numeral converter, that converts hindu numerals to arabic numerals and vice versa.
Installation
npm install hindu-numerals
Usage
import { toHinduNumerals, toArabicNumerals } from "hindu-numerals";
//
console.log(toHinduNumerals(1234)); // "१२३४" the return type is always a string
console.log(toArabicNumerals("१")); // 1 the return type is number if it is a valid number otherwise it is string
// it will leave all the non numerical string characters as it is and only convert the numerical string characters
console.log(toHinduNumerals("12abdc34")); // "१२abdc३४" the return type is always a string