mirror of
https://github.com/unraid/api.git
synced 2025-12-30 21:19:49 -06:00
18 lines
458 B
JavaScript
18 lines
458 B
JavaScript
/**
|
|
* This function wraps constant case, that turns any string into CONSTANT_CASE
|
|
* However, this function has a bug that, if you pass _ to it it will return an empty
|
|
* string. This small module fixes that
|
|
*
|
|
* @param {string*} str
|
|
* @return {string}
|
|
*/
|
|
function FixArrayType (str) {
|
|
if (str === 'Array') {
|
|
return 'ArrayType';
|
|
}
|
|
// If result is an empty string, just return the original string
|
|
return str;
|
|
}
|
|
|
|
module.exports = FixArrayType;
|