everyutil
Version:
A comprehensive library of lightweight, reusable utility functions for JavaScript and TypeScript, designed to streamline common programming tasks such as string manipulation, array processing, date handling, and more.
17 lines (16 loc) • 456 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.mirrorText = void 0;
/**
* Returns the mirrored (reversed) version of the input string.
*
* Example: mirrorText("hello") → "olleh"
*
* @author @dailker
* @param {string} str - The input string.
* @returns {string} The reversed string.
*/
function mirrorText(str) {
return str.split('').reverse().join('');
}
exports.mirrorText = mirrorText;