wynnbuilder-forked-for-changes/query.js

22 lines
373 B
JavaScript
Raw Normal View History

2021-01-23 16:38:13 +00:00
/**
* @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;
}
}