nfp_sites/api/filter.mjs
2019-09-13 13:33:10 +00:00

8 lines
200 B
JavaScript

export default function filter(input = [], itemFilter = []) {
if (input && input.length) {
let out = input.filter(item => item && itemFilter.indexOf(item) < 0)
return out
}
return []
}