Snow 1d0b9c5323 增加了node环境 | vor 1 Monat | |
---|---|---|
.. | ||
LICENSE | vor 1 Monat | |
Readme.md | vor 1 Monat | |
cli.js | vor 1 Monat | |
index.js | vor 1 Monat | |
package.json | vor 1 Monat | |
test.sh | vor 1 Monat |
Detect direction: left-to-right, right-to-left, or neutral.
npm:
$ npm install direction
Component:
$ component install wooorm/direction
Bower:
$ bower install direction
var direction = require('direction');
direction("A"); // "ltr"
direction("anglais"); // "ltr"
direction("بسيطة"); // "rtl"
direction("@"); // "neutral"
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
MIT © Titus Wormer