nodes-properties-equal.js 249 B

123456789101112
  1. const nodesPropertiesEqual = (nodeA, nodeB, key) => {
  2. if (nodeA.type === 'TemplateElement' && key === 'value') {
  3. return nodeA.value.raw === nodeB.value.raw;
  4. }
  5. return nodeA[key] === nodeB[key];
  6. };
  7. module.exports = {
  8. nodesPropertiesEqual,
  9. };