@dafengzhen/derivative-matcher
v0.1.1
Published
A string pattern matching DSL engine for TypeScript, powered by Brzozowski derivatives.
Downloads
262
Maintainers
Readme
derivative-matcher
一个基于 Brzozowski 导数的 TypeScript 字符串模式匹配 DSL 引擎
安装
npm install @dafengzhen/derivative-matcher快速开始
import { createPatternMatcher, testPattern } from '@dafengzhen/derivative-matcher';
const matcher = createPatternMatcher('^hello$');
console.log(matcher.test('hello')); // true
console.log(testPattern('a|b', 'a')); // true贡献
欢迎贡献 PR!
