import { expand } from "https://deno.land/x/dxx@rf/src/lib/xBraces.ts";
Brace expand a string argument.
- Bash-like brace expansion (compatible with the Bash v4.3 specification).
- Quotes (single or double) are used to protect braces from expansion; unbalanced quotes are allowed (and parsed as if completed by the end of the string). No character escape sequences are recognized.
- Supports lists/sets, ranges/sequences, and range increments.
Uses the 'braces' JS module.
Examples
Example 1
Example 1
const text = '{a,b} text string {1..10..2}';
const expansion = expand(text);