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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    2
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    2
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i hindu-numerals

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

6.22 kB

Total Files

9

Last publish

Collaborators

  • ashah.de