edit-on-slate
Version:
Slate 기반의 직관적이고 강력한 리액트 텍스트 에디터 라이브러리
85 lines (52 loc) • 1.49 kB
Markdown
[![Build][build-badge]][build]
[![Coverage][coverage-badge]][coverage]
[![Downloads][downloads-badge]][downloads]
[![Size][size-badge]][size]
Detect direction: left-to-right, right-to-left, or neutral.
Install:
```sh
npm install direction
```
Use:
```js
var direction = require('direction')
direction('A') // => 'ltr'
direction('anglais') // => 'ltr'
direction('بسيطة') // => 'rtl'
direction('@') // => 'neutral'
```
Install:
```sh
npm install -g direction
```
Use:
```txt
Usage: direction [options] <words...>
Detect directionality: left-to-right, right-to-left, or neutral
Options:
-h, --help output usage information
-v, --version output version number
Usage:
$ direction @
$ echo 'الانجليزية' | direction
```
[][license] © [Titus Wormer][author]
<!-- Definitions -->
[]: https://img.shields.io/travis/wooorm/direction.svg
[]: https://travis-ci.org/wooorm/direction
[]: https://img.shields.io/codecov/c/github/wooorm/direction.svg
[]: https://codecov.io/github/wooorm/direction
[]: https://img.shields.io/npm/dm/direction.svg
[]: https://www.npmjs.com/package/direction
[]: https://img.shields.io/bundlephobia/minzip/direction.svg
[]: https://bundlephobia.com/result?p=direction
[]: license
[]: https://wooorm.com