JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2096297
  • Score
    100M100P100Q208404F
  • License MIT

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

Package Exports

  • direction

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (direction) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

direction Build Status Coverage Status

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