Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import vendors from 'vendors';
const prefixes = vendors.map(vendor => `-${vendor}-`);
export default function prefixedDeclarations ({nodes}) {
const prefix = node => prefixes.some(p => node.prop && !node.prop.indexOf(p));
return nodes.filter(prefix);
}