export function camelCase(string) {
    checkStringIsValid(string);
    if (string === '') {
        return string;
    }
    const [firstLetter, ...rest] = string.replace(/[\W_]/g, '');
    return `${firstLetter.toLowerCase()}${rest.join('')}`;
}
export function upperFirst(string) {
    checkStringIsValid(string);
    if (string === '') {
        return string;
    }
    const [firstLetter, ...rest] = string;
    return `${firstLetter.toUpperCase()}${rest.join('')}`;
}
export function lowerFirst(string) {
    checkStringIsValid(string);
    if (string === '') {
        return string;
    }
    const [firstLetter, ...rest] = string;
    return `${firstLetter.toLowerCase()}${rest.join('')}`;
}
function checkStringIsValid(string) {
    if (string === undefined || string === null) {
        throw new Error('The passed string cannot be nil.');
    }
}
