wynnbuilder-forked-for-changes/query.js
2021-01-23 10:38:13 -06:00

22 lines
373 B
JavaScript

/**
* @description A query into the item
* @module ItemNotFound
*/
class NameQuery {
constructor(string) {
this.queryString = string;
}
filter(item) {
if (item.remapID === undefined) {
return (item.displayName.includes(this.queryString));
}
return false;
}
compare(a, b) {
return a < b;
}
}