dist/hawtio-utilities.js
function fileExtension(name, defaultValue) {
        if (defaultValue === void 0) { defaultValue = ""; }
        var extension = defaultValue;
        if (name) {
            var idx = name.lastIndexOf(".");
            if (idx > 0) {
                extension = name.substring(idx + 1, name.length).toLowerCase();
            }
        }
        return extension;
    }
function fileExtension(name, defaultValue) {
        if (defaultValue === void 0) { defaultValue = ""; }
        var extension = defaultValue;
        if (name) {
            var idx = name.lastIndexOf(".");
            if (idx > 0) {
                extension = name.substring(idx + 1, name.length).toLowerCase();
            }
        }
        return extension;
    }
function fileExtension ( name , defaultValue ) { if ( defaultValue === void 0 ) { defaultValue = "" ; } var extension = defaultValue ; if ( name ) { var idx = name . lastIndexOf ( "." ) ; if ( idx > 0 ) { extension = name . substring ( idx + 1 , name . length ) . toLowerCase ( ) ; } } return extension ; }
Returns the lowercase file extension of the given file name or returns the empty
string if the file does not have an extension
@method fileExtension
@for Core
@static
@param {String} name
@param {String} defaultValue
@return {String}
Returns the lowercase file extension of the given file name or returns the empty string if the file does not have an extension