lib/utensils.js
function getCamelCase(filePath) {
    if (!filePath) {
        return '';
    }

    // clip off everything by after the last slash and the .js
    filePath = filePath.substring(filePath.lastIndexOf(delim) + 1);

    if (filePath.substring(filePath.length - 3) === '.js') {
        filePath = filePath.substring(0, filePath.length - 3);
    }

    // replace dots with caps
    var parts = filePath.split('.');
    var i;
    for (i = 1; i < parts.length; i++) {
        parts[i] = parts[i].substring(0, 1).toUpperCase() +
            parts[i].substring(1);
    }

    // replace dashs with caps
    filePath = parts.join('');
    parts = filePath.split('-');
    for (i = 1; i < parts.length; i++) {
        parts[i] = parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1);
    }

    return parts.join('');
}
function getCamelCase(filePath) {
    if (!filePath) {
        return '';
    }

    // clip off everything by after the last slash and the .js
    filePath = filePath.substring(filePath.lastIndexOf(delim) + 1);

    if (filePath.substring(filePath.length - 3) === '.js') {
        filePath = filePath.substring(0, filePath.length - 3);
    }

    // replace dots with caps
    var parts = filePath.split('.');
    var i;
    for (i = 1; i < parts.length; i++) {
        parts[i] = parts[i].substring(0, 1).toUpperCase() +
            parts[i].substring(1);
    }

    // replace dashs with caps
    filePath = parts.join('');
    parts = filePath.split('-');
    for (i = 1; i < parts.length; i++) {
        parts[i] = parts[i].substring(0, 1).toUpperCase() + parts[i].substring(1);
    }

    return parts.join('');
}
function getCamelCase ( filePath ) { if ( ! filePath ) { return '' ; } // clip off everything by after the last slash and the .js filePath = filePath . substring ( filePath . lastIndexOf ( delim ) + 1 ) ; if ( filePath . substring ( filePath . length - 3 ) === '.js' ) { filePath = filePath . substring ( 0 , filePath . length - 3 ) ; } // replace dots with caps var parts = filePath . split ( '.' ) ; var i ; for ( i = 1 ; i < parts . length ; i ++ ) { parts [ i ] = parts [ i ] . substring ( 0 , 1 ) . toUpperCase ( ) + parts [ i ] . substring ( 1 ) ; } // replace dashs with caps filePath = parts . join ( '' ) ; parts = filePath . split ( '-' ) ; for ( i = 1 ; i < parts . length ; i ++ ) { parts [ i ] = parts [ i ] . substring ( 0 , 1 ) . toUpperCase ( ) + parts [ i ] . substring ( 1 ) ; } return parts . join ( '' ) ; }
Get module name from a full file path. This is done
by removing the parent dirs and replacing dot naming
with camelCase

@param filePath Full file path to a pancakes module
@return {String} The name of the module.
Get module name from a full file path . This is done by removing the parent dirs and replacing dot naming with camelCase