nfp_sites/api/filter.mjs

9 lines
200 B
JavaScript
Raw Normal View History

2019-09-13 13:33:10 +00:00
export default function filter(input = [], itemFilter = []) {
if (input && input.length) {
let out = input.filter(item => item && itemFilter.indexOf(item) < 0)
return out
}
return []
}