hindu-numerals
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

Dependencies (0)

    Dev Dependencies (6)

    Package Sidebar

    Install

    npm i hindu-numerals

    Weekly Downloads

    6

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    6.22 kB

    Total Files

    9

    Last publish

    Collaborators

    • ashah.de