@alfredobaratta/reverse-words
Version:
Reverse words in a text quickly and easily!
13 lines (12 loc) • 604 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.clearItem = exports.reverseItem = exports.toArray = exports.splittedText = void 0;
const lodash_1 = require("lodash");
const splittedText = (text) => (0, lodash_1.split)(text, " ");
exports.splittedText = splittedText;
const toArray = (text) => (0, lodash_1.split)(text, "");
exports.toArray = toArray;
const reverseItem = (text) => (0, lodash_1.reverse)(text).toString();
exports.reverseItem = reverseItem;
const clearItem = (text) => (0, lodash_1.replace)(text, /\,/g, "");
exports.clearItem = clearItem;