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