in packages/svg-mixer/runtime/src/utils/select-attributes.js [8:20]
export default function selectAttributes(nodes, matcher) {
const attrs = arrayFrom(nodes).reduce((acc, node) => {
if (!node.attributes) {
return acc;
}
const arrayfied = arrayFrom(node.attributes);
const matched = matcher ? arrayfied.filter(matcher) : arrayfied;
return acc.concat(matched);
}, []);
return attrs;
}