UNPKG

@sprucelabs/spruce-skill-utils

Version:

Loosely coupled classes and functions to make skill development faster! 🏎

11 lines (10 loc) 287 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = joinIntoSentence; function joinIntoSentence(words) { const last = words.pop(); if (words.length === 0) { return last ?? ''; } return words.join(', ') + ' & ' + last; }