UNPKG

mr-case

Version:

55 functions to seamlessly transform strings, arrays, and object keys between different cases (camelCase, snake_case, kebab-case, PascalCase, Title Case, and more), clean and format text, extract URL components, and perform common text operations like mas

7 lines (5 loc) 192 B
function reverseWords(str) { if (typeof str !== 'string') throw new Error('Input must be a string'); return str.split(' ').reverse().join(' '); } module.exports = reverseWords;