Snow 1d0b9c5323 增加了node环境 1 bulan lalu
..
LICENSE 1d0b9c5323 增加了node环境 1 bulan lalu
Readme.md 1d0b9c5323 增加了node环境 1 bulan lalu
cli.js 1d0b9c5323 增加了node环境 1 bulan lalu
index.js 1d0b9c5323 增加了node环境 1 bulan lalu
package.json 1d0b9c5323 增加了node环境 1 bulan lalu
test.sh 1d0b9c5323 增加了node环境 1 bulan lalu

Readme.md

direction Build Status Coverage Status

Detect direction: left-to-right, right-to-left, or neutral.

Installation

npm:

$ npm install direction

Component:

$ component install wooorm/direction

Bower:

$ bower install direction

Usage

var direction = require('direction');

direction("A"); // "ltr"
direction("anglais"); // "ltr"
direction("بسيطة"); // "rtl"
direction("@"); // "neutral"

CLI

Install:

$ npm install direction --global

Usage:

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:

# output direction of given values
$ direction @
# neutral

# output direction from stdin
$ echo "الانجليزية" | direction
# rtl

License

MIT © Titus Wormer