12 lines
292 B
JavaScript
12 lines
292 B
JavaScript
export class Pattern {
|
|
regex;
|
|
replacement;
|
|
constructor(regex, replacement) {
|
|
this.regex = regex;
|
|
this.replacement = replacement;
|
|
}
|
|
apply(raw) {
|
|
return raw.replace(this.regex, this.replacement);
|
|
}
|
|
}
|
|
//# sourceMappingURL=Pattern.js.map
|