export function subset (current, target) {
if (!current instanceof Array) {
if (current[0] === '!') {
return target.indexOf(current.slice(1)) < 0
}
return target.indexOf(current) > -1
}
return current.reduce((res, item) => {
let currentRes
if (item[0] === '!') {
currentRes = target.indexOf(item.slice(1)) < 0
} else {
currentRes = target.indexOf(item) > -1
}
return res && currentRes
}, true)
}