devnagri-numerals
v1.0.1
Published
It make possible to convert Arabic numerals to devnagri numerals and vice-versa.
Downloads
1
Maintainers
Readme
Devnagri numerals
It converts Arabic numerals to Devnagri
Installation
# for NPM
npm install devnagri-numerals
# for Yarn
yarn add devnagri-numerals
# for Bower
bower add devnagri-numerals
Functions
toDevnagriNumeral(arabicNumeral)
- Parameters:
arabicNumeral
should be of typenumber
- Returns:
string
toArabicNumeral(devnagriString)
- Parameters:
devnagriString
should be of typestring
- Returns:
number
Usage
- Import it
const devnagriConvertor = require('devnagri-numerals');
Or for Babel Node
import * as devnagriConvertor from "devnagri-numerals";
- Convert Arabic to Devnagri
var devnagri_nums = devnagriConvertor.toDevnagriNumeral(232);
- Convert Devnagri to Arabic
var arabic_nums = devnagriConvertor.toArabicNumeral('१३७८४');
Build or Test
npm install
npm run test