UNPKG

codetrix

Version:

A lightweight lodash-style utility library

13 lines (12 loc) 248 B
/** * Reverses a given string. * * @param str - The string to reverse. * @returns The reversed string. * * @example * reverseString('hello'); // 'olleh' */ export function reverseString(str) { return str.split('').reverse().join(''); }