is-shorthand-property-assignment-pattern-left.js 356 B

12345678910
  1. 'use strict';
  2. const isShorthandPropertyValue = require('./is-shorthand-property-value.js');
  3. const isShorthandPropertyAssignmentPatternLeft = identifier =>
  4. identifier.parent.type === 'AssignmentPattern'
  5. && identifier.parent.left === identifier
  6. && isShorthandPropertyValue(identifier.parent);
  7. module.exports = isShorthandPropertyAssignmentPatternLeft;