Rinser/plugins/filter_location.js
2017-05-30 09:23:57 +01:00

8 lines
259 B
JavaScript

module.exports = function (item, itemOptions, source) {
var patt = /(glasgow|london|edinburgh)/ig;
var result = patt.test(itemOptions.description);
var resultB = patt.test(itemOptions.title);
return (result||resultB === true) ? itemOptions : -1;
};