demo/editor/kissy.js
function (path, ext) {
            var result = path.match(splitPathRe) || [],
                basename;
            basename = result[3] || '';
            if (ext && basename && basename.slice(-1 * ext.length) == ext) {
                basename = basename.slice(0, -1 * ext.length);
            }
            return basename;
        }
function (path, ext) {
            var result = path.match(splitPathRe) || [],
                basename;
            basename = result[3] || '';
            if (ext && basename && basename.slice(-1 * ext.length) == ext) {
                basename = basename.slice(0, -1 * ext.length);
            }
            return basename;
        }
function ( path , ext ) { var result = path . match ( splitPathRe ) || [ ] , basename ; basename = result [ 3 ] || '' ; if ( ext && basename && basename . slice ( - 1 * ext . length ) == ext ) { basename = basename . slice ( 0 , - 1 * ext . length ) ; } return basename ; }
Get base name of path
@param {String} path
@param {String} [ext] ext to be stripped from result returned.
@return {String}
Get base name of path