/ar-num-to-en-num

Convert Arabic numbers to English numbers

Primary LanguageTypeScriptMIT LicenseMIT

@devmoath/ar-num-to-en-num Node.js Package npm

Convert Arabic numbers to English numbers

Installation

Install the plugin from npm:

# Using npm
npm install @devmoath/ar-num-to-en-num

# Using Yarn
yarn add @devmoath/ar-num-to-en-num

Usage

// es module import:
import convert from '@devmoath/ar-num-to-en-num';

// commonjs import:
const convert = require('@devmoath/ar-num-to-en-num').default;

convert('test ١٢٣'); // test 123
convert('كلمة ١٢٣'); // كلمة 123

// if you pass non-string value the function will return false
convert({}); // false
convert([]); // false