# vue-persian-numbers-directive

> A Vue directive that converts Persian char numbers to English char numbers

Latest version **1.0.2** (published 2022-07-24) · ISC license · 0 weekly downloads

## Install

```sh
npm install vue-persian-numbers-directive
pnpm add vue-persian-numbers-directive
yarn add vue-persian-numbers-directive
bun add vue-persian-numbers-directive
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2022-07-24 |
| First published | 2022-01-26 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Fariborz Korevli |
| Maintainers | firibz |
| Keywords | vue, vue.js, convert, persian, numbers, digits, directive |

## Links

- npm: https://www.npmjs.com/package/vue-persian-numbers-directive
- Repository: https://github.com/firibz/vue-persian-numbers-directive
- Homepage: https://github.com/firibz/vue-persian-numbers-directive#readme
- Issues: https://github.com/firibz/vue-persian-numbers-directive/issues
- npm.io page: https://npm.io/package/vue-persian-numbers-directive

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2022-07-24
- 1.0.1 — 2022-07-24
- 1.0.0 — 2022-01-26

## README

# vue-persian-numbers-directive
A Vue directive that converts Persian char numbers to English char numbers

## Install the dependency
```bash
yarn add vue-persian-numbers-directive
# or
npm i vue-persian-numbers-directive
```

### How to use
```bash
import { toEnglishNumbersDirective, toOnlyEnglishNumbersDirective } from 'vue-persian-numbers-directive/src/vue-persian-numbers-directive'
```

Convert Persian numbers to English numbers and allow other characters:
```bash
  app.directive('englishNumbers', toEnglishNumbersDirective)
```
Then use the directive as v-english-numbers on input component like this:
```bash
  <any-input
        v-english-numbers
        v-model="theModel"
        anything else...>
  </any-input>
```


Convert Persian numbers to English numbers and not allow any other character:
```bash
  app.directive('onlyEnglishNumbers', toOnlyEnglishNumbersDirective)
```
Then use the directive as v-only-english-numbers on input component like this:
```bash
  <any-input
        v-only-english-numbers
        v-model="theModel"
        anything else...>
  </any-input>
```

---
_Source: https://npm.io/package/vue-persian-numbers-directive · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
