case-sensitive-transform.js 300 B

1234567891011
  1. /**
  2. * @param {Record<string, string>} attributes
  3. * Attributes.
  4. * @param {string} attribute
  5. * Attribute.
  6. * @returns {string}
  7. * Transformed attribute.
  8. */
  9. export function caseSensitiveTransform(attributes, attribute) {
  10. return attribute in attributes ? attributes[attribute] : attribute
  11. }