Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
#arabicString
# arabicString

A Javascript library that extends the native `String` object with methods to help when dealing with Arabic strings for _node_ and _the browser_.

##Usage
###node
## Usage
### node
```js
require('arabicString')
```
###browser
### browser
```js
<script src="arabicString.js"></script>
```

##String#howArabic()
### String.howArabic()

The percentage of Arabic letters in the `String`.

### Example
#### Example

```js
'foobar'.howArabic()
Expand All @@ -27,11 +27,11 @@ The percentage of Arabic letters in the `String`.
//=> 1.0
```

##String#howNotArabic()
### String.howNotArabic()

The percentage of non-Arabic letters in the `String`.

### Example
#### Example

```js
'فوبار'.howNotArabic()
Expand All @@ -42,11 +42,11 @@ The percentage of non-Arabic letters in the `String`.
//=> 1.0
```

##String#isArabic(threshold)
### String.isArabic(threshold)

Is the `String` Arabic, based on a given `threshold` between `0` and `1`. Defaults to `0.79`.

### Example
#### Example

```js
'فوو'.isArabic()
Expand All @@ -55,11 +55,11 @@ Is the `String` Arabic, based on a given `threshold` between `0` and `1`. Defaul
//=> false
```

##String#hasArabic()
### String.hasArabic()

Does the `String` have _any_ Arabic letter.

### Example
#### Example

```js
'فوو bar'.hasArabic()
Expand All @@ -68,11 +68,11 @@ Does the `String` have _any_ Arabic letter.
//=> false
```

##String#removeTashkel()
### String.removeTashkel()

Will return the `String` without the diacritics.

### Example
#### Example

```js
'مٌحمْد'.removeTashkel()
Expand Down