INNER CODE UNIT · JavaScript
getAttribute
grapp-dev/stacks · plugin/index.js:4
const getAttribute = (attributes, name) => {
return attributes.find(attribute => {
return attribute.name.name === name;
});
};
const makeBreakpointCallExpression = (key, value) => {
const expression = value.type === 'JSXExpressionContainer' ? value.expression : value;
return t.callExpression(
t.memberExpression(
t.callExpression(t.identifier('useBreakpointComparators'), []),
t.identifier(key),
),
[expression],
);
};