line_push/node_modules/eslint-template-visitor/lib/nodes-properties-equal.js
2022-07-17 13:16:16 +08:00

13 lines
249 B
JavaScript

const nodesPropertiesEqual = (nodeA, nodeB, key) => {
if (nodeA.type === 'TemplateElement' && key === 'value') {
return nodeA.value.raw === nodeB.value.raw;
}
return nodeA[key] === nodeB[key];
};
module.exports = {
nodesPropertiesEqual,
};