You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Natsuki/util/tag.js

22 lines
642 B

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Tag = void 0;
class Tag {
constructor(triggers, tagName, filterType) {
this.triggers = [];
let trigger;
for (trigger of triggers) {
this.triggers.push(trigger.trim().startsWith("-") ? trigger.trim() : `-${trigger.trim()}`);
}
this.tagName = tagName;
this.filterType = filterType;
}
;
addTrigger(trigger) {
this.triggers.push(trigger.trim().startsWith("-") ? trigger.trim() : `-${trigger.trim()}`);
return this;
}
;
}
exports.Tag = Tag;