UNPKG

cpt-waffle-lotide

Version:
13 lines (12 loc) 375 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const pigLatin = (string) => { const words = string.split(' '); const result = words.map((word) => { const firstLetter = word[0]; const subWord = word.slice(1); return subWord + firstLetter + 'ay'; }); return result.join(' '); }; exports.default = pigLatin;