1.0.0 • Published 6 months ago

carol-js v1.0.0

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

carol-js

A small tool for building regular expressions.
We build a RegExp object by combining functions.
We only support ES modules.

Example

import carol from 'carol-js';

const regex = carol.seq([
  carol(/hello/),
  carol(/ /),
  carol(/world/),
  carol(/!/).many(1),
]).many().toRegex();

assert.strictEqual(regex.source, '(?:hello world(?:!)+)*');

Documents

Installation

npm i carol-js

Test

git clone https://github.com/marihachi/carol-js.git
cd carol-js
npm i
npm run build
npm test

License

MIT

1.0.0

6 months ago

0.5.0

6 months ago

0.4.0

6 months ago

0.3.0

6 months ago

0.2.0

6 months ago

0.1.0

6 months ago