JSPM

devnagri-numerals

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q13643F
  • License MIT

It make possible to convert Arabic numerals to devnagri numerals and vice-versa.

Package Exports

  • devnagri-numerals
  • devnagri-numerals/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (devnagri-numerals) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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 type number
  • Returns: string

toArabicNumeral(devnagriString)

  • Parameters: devnagriString should be of type string
  • 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