diff --git a/Src/Controllers/Text.js b/Src/Controllers/Text.js index 3ba279e..7affd13 100644 --- a/Src/Controllers/Text.js +++ b/Src/Controllers/Text.js @@ -1,5 +1,9 @@ -const { reverseString, textToBinary, sarcasticConverter, textToMorse } = - require('../Utilities/functions') +const { + reverseString, + textToBinary, + sarcasticConverter, + textToMorse +} = require('../Utilities/functions') exports.shuffle = async (req, res, next) => { try { @@ -14,7 +18,12 @@ exports.shuffle = async (req, res, next) => { return next() } - const shuffledWord = text.split(/\s\b(?!\s)/).sort(function () { return 0.5 - Math.random() }).join(' ') + const shuffledWord = + text + .split(/\s\b(?!\s)/) + .sort(function () { + return 0.5 - Math.random() + }).join(' ') res.status(200).json({ 'shuffled Word': shuffledWord @@ -23,7 +32,7 @@ exports.shuffle = async (req, res, next) => { res.status(500).json({ error: error }) - } + } } exports.reverse = async (req, res, next) => { @@ -48,7 +57,7 @@ exports.reverse = async (req, res, next) => { res.status(500).json({ error: error }) - } + } } exports.binary = async (req, res, next) => { @@ -124,4 +133,4 @@ exports.morse = async (req, res, next) => { error: error }) } -} +}