0.10.2 • Published 9 months ago

parsea v0.10.2

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

parsea

NPM Version JSR Version License npm bundle size Codecov

parsea is a parser combinator library for parsing ArrayLike with TypeScript.

import * as P from "parsea";

const parser = P.seq([
    P.regex(/-?\d+(\.\d+)?/).map(Number.parseFloat),
    P.regex(/[A-Z]+/i),
]).map(([value, unit]) => ({ value, unit }));

P.parseA(parser, "273.15K"); // => { value: 273.15, unit: "K" }

See also examples/ directory.

Inspired by

0.10.0

10 months ago

0.10.1

9 months ago

0.10.2

9 months ago

0.9.0

1 year ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago