smartmatch/ts/index.ts

13 lines
305 B
TypeScript
Raw Normal View History

2020-02-25 18:34:29 +00:00
import * as plugins from './smartmatch.plugins';
2020-02-25 19:02:52 +00:00
export class SmartMatch {
private picomatch;
2020-02-25 19:54:15 +00:00
public wildcard;
constructor(wildcardArg: string) {
this.wildcard = wildcardArg;
2020-02-25 19:02:52 +00:00
}
public match(matchStringArg): boolean {
2020-02-25 19:54:15 +00:00
return plugins.matcher.isMatch(matchStringArg, this.wildcard);
2020-02-25 19:02:52 +00:00
}
}