reports/frontend/node_modules/es-toolkit/dist/string/reverseString.js
jtricerolph 1c411e402e Add settings page for managing forecasting API key and URL via UI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-20 14:37:36 +00:00

19 lines
616 B
JavaScript

//#region src/string/reverseString.ts
/**
* Reverses a given string.
*
* This function takes a string as input and returns a new string that is the reverse of the input.
*
* @param value - The string that is to be reversed.
* @returns The reversed string.
*
* @example
* const reversedStr1 = reverseString('hello') // returns 'olleh'
* const reversedStr2 = reverseString('PascalCase') // returns 'esaClacsaP'
* const reversedStr3 = reverseString('foo 😄 bar') // returns 'rab 😄 oof'
*/
function reverseString(value) {
return [...value].reverse().join("");
}
//#endregion
exports.reverseString = reverseString;