mirror of
https://github.com/Funkoala14/knowledgebase_law.git
synced 2025-06-09 13:58:13 +08:00
12 lines
300 B
JavaScript
12 lines
300 B
JavaScript
|
/**
|
||
|
* @param {Record<string, string>} attributes
|
||
|
* Attributes.
|
||
|
* @param {string} attribute
|
||
|
* Attribute.
|
||
|
* @returns {string}
|
||
|
* Transformed attribute.
|
||
|
*/
|
||
|
export function caseSensitiveTransform(attributes, attribute) {
|
||
|
return attribute in attributes ? attributes[attribute] : attribute
|
||
|
}
|