Skip to content
main
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

direction

Build Coverage Downloads Size

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

API

Install:

npm install direction

Use:

var direction = require('direction')

direction('A') // => 'ltr'
direction('anglais') // => 'ltr'
direction('بسيطة') // => 'rtl'
direction('@') // => 'neutral'

CLI

Install:

npm install -g direction

Use:

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 directionality
$ direction @
# neutral

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

License

MIT © Titus Wormer

About

Detect directionality: left-to-right, right-to-left, or neutral

Topics

Resources

License

Sponsor this project

 
Learn more about GitHub Sponsors

Packages

No packages published
You can’t perform that action at this time.