8 lines
259 B
JavaScript
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;
|
|
|
|
};
|