UNPKG

563 BJavaScriptView Raw
1"use strict";
2/**
3 * @author: JP Lew (jp@cto.ai)
4 * @date: Monday, 29th April 2019 5:55:21 pm
5 * @lastModifiedBy: JP Lew (jp@cto.ai)
6 * @lastModifiedTime: Friday, 13th September 2019 1:13:02 pm
7 * @copyright (c) 2019 CTO.ai
8 */
9Object.defineProperty(exports, "__esModule", { value: true });
10exports.titleCase = (str) => {
11 return str
12 .split(' ')
13 .map(w => w[0].toUpperCase() + w.substr(1).toLowerCase())
14 .join(' ');
15};
16exports.pluralize = (str) => {
17 return `${str}s`;
18};
19exports.appendSuffix = (name, suffix) => `${name}${suffix}`;