2.0.0 • Published 6 years ago

arc-flag-parser v2.0.0

Weekly downloads
8
License
MIT
Repository
-
Last release
6 years ago

arc-flag-parser

Parse arc flag expressions to arrays of flag matches

Syntax

  • + represents AND
  • , represents OR
  • AND (+) has higher precedence than OR (,)
  • [] is used to increase the precedence of the wrapped group

Examples

import { parse } from 'arc-flag-parser';
parse('mobile+ios') // [ ['mobile', 'ios'] ]
import { parse } from 'arc-flag-parser';
parse('mobile,ios') // [ ['mobile'], ['ios'] ]
import { parse } from 'arc-flag-parser';
parse('mobile+[ios,android]') // [ ['mobile', 'ios'], ['mobile', 'android'] ]

See test.js for more examples

2.0.0

6 years ago

2.0.0-alpha.2

7 years ago

2.0.0-alpha.1

7 years ago

2.0.0-alpha.0

7 years ago