smartmatch/ts/index.ts

13 lines
301 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 {
2020-02-25 19:55:32 +00:00
public wildcard: string;
2020-02-25 19:54:15 +00:00
constructor(wildcardArg: string) {
this.wildcard = wildcardArg;
2020-02-25 19:02:52 +00:00
}
2020-02-25 19:55:32 +00:00
public match(matchStringArg: string): boolean {
2020-02-25 19:54:15 +00:00
return plugins.matcher.isMatch(matchStringArg, this.wildcard);
2020-02-25 19:02:52 +00:00
}
2020-05-25 18:09:39 +00:00
}