# arabic-reshaper

> Reshapes Arabic words to work in non-supported environments.

Latest version **1.1.0** (published 2016-11-21) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install arabic-reshaper
pnpm add arabic-reshaper
yarn add arabic-reshaper
bun add arabic-reshaper
```

## 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.1.0 |
| Published | 2016-11-21 |
| First published | 2015-08-20 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 38 |
| Author | Louay Alakkad |
| Maintainers | louy |

## Links

- npm: https://www.npmjs.com/package/arabic-reshaper
- Repository: https://github.com/louy/Javascript-Arabic-Reshaper
- Homepage: https://github.com/louy/Javascript-Arabic-Reshaper#readme
- Issues: https://github.com/louy/Javascript-Arabic-Reshaper/issues
- npm.io page: https://npm.io/package/arabic-reshaper

## Recent versions

- 1.1.0 (latest) — 2016-11-21
- 1.0.0 — 2015-09-08
- 0.0.0 — 2015-08-20

## README

# Javascript-Arabic-Reshaper

[![Circle CI](https://img.shields.io/circleci/project/louy/Javascript-Arabic-Reshaper.svg)](https://circleci.com/gh/louy/Javascript-Arabic-Reshaper)
[![Codecov](https://img.shields.io/codecov/c/github/louy/Javascript-Arabic-Reshaper.svg)](https://codecov.io/github/louy/Javascript-Arabic-Reshaper/)
[![Codacy](https://img.shields.io/codacy/7aeab38f4ce043be8e10a14707fdb7a8.svg)](https://www.codacy.com/app/louy/Javascript-Arabic-Reshaper)
[![NPM](https://img.shields.io/npm/v/arabic-reshaper.svg)](https://www.npmjs.com/package/arabic-reshaper)
[![VersionEye](https://img.shields.io/versioneye/d/user/projects/562e7f9836d0ab00210013bb.svg)](https://www.versioneye.com/nodejs/arabic-reshaper/)

Reshapes Arabic words to work in non-supported environments and with custom web fonts.

Meant to be used in the browser, but can also be used in server-side environments for things such as generating PDF files.
This script mainly converts characters in the Arabic block to Arabic Presentation Forms-A/B — something that rendering engines should do by themselves but sometimes fail to do so. This solves the issue of disconnected Arabic letters which can be seen while using a custom font in almost all platforms (Web, Android, iOS, ...)

For more details, check these articles on Wikipedia:
* https://en.wikipedia.org/wiki/Complex_text_layout
* https://en.wikipedia.org/wiki/Arabic_script_in_Unicode

This script is inspired by the following projects:
* https://github.com/agawish/Better-Arabic-Reshaper/
* https://github.com/mpcabd/python-arabic-reshaper/

## Installation

    npm i --save arabic-reshaper

## Usage

    var ArabicReshaper = require('arabic-reshaper');
    document.write(ArabicReshaper.convertArabic('السلام عليكم')); // outputs ﺍﻟﺴﻼﻡ ﻋﻠﻴﻜﻢ

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