UNPKG

@azizbecha/strkit

Version:

strkit is a utility library offering a collection of essential string functions including validation, case conversion, truncation, and more. Ideal for both JavaScript and TypeScript developers to simplify string operations in their applications.

20 lines 526 B
"use strict"; /** * Reverses the characters in a given string. * * This function takes an input string and returns a new string * with the characters in reverse order. * * @param str - The string to reverse. * @returns The reversed string. * * @example * reverse('hello'); // "olleh" * reverse('12345'); // "54321" */ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = reverse; function reverse(str) { return str.split('').reverse().join(''); } //# sourceMappingURL=reverse.js.map