@jjkavalam/scanner
v1.0.0
Published
An easy-to-use tokenizer
Downloads
2
Readme
scanner
An easy-to-use tokenizer
Usage
const { Scanner, Patterns } = require("@jjkavalam/scanner");
const sc = new Scanner(`... contents ...`);
// scan until end-of-line
const firstLine = sc.scanUntil(Patterns.EOL);
// or any arbitrary string or Regexp pattern
const nextColumn = sc.scanUntil(",");
// ...