John Cowen 3135f0628a ui: Add vendor directory as a target for JS linting and lint (#9157)
* ui: Add vendor for js linting

* Lint all the things
2020-11-11 17:00:29 +00:00

13 lines
468 B
JavaScript

export default () => term => item => {
const source = item.SourceName.toLowerCase();
const destination = item.DestinationName.toLowerCase();
const allLabel = 'All Services (*)'.toLowerCase();
const lowerTerm = term.toLowerCase();
return (
source.indexOf(lowerTerm) !== -1 ||
destination.indexOf(lowerTerm) !== -1 ||
(source === '*' && allLabel.indexOf(lowerTerm) !== -1) ||
(destination === '*' && allLabel.indexOf(lowerTerm) !== -1)
);
};