dist/bbn.js
/**
     * Returns the name of the element indicated by path given to it as an argument.
     *
     * @method   baseName
     * @global
     *
     * @example
     * ```javascript
     * // "file.png"
     * bbn.fn.baseName('folder/other_folder/file.png');
     * ```
     * @example
     * ```javascript
     * // "file"
     * bbn.fn.baseName('folder/other_folder/file.png', '.png');
     * ```
     *
     * @memberof bbn.fn
     * @param    {String} path   The path from which the basename must be extracted
     * @param    {String} suffix An optional suffix that will be removed from the basename
     * @returns  {String} The basename of path
     */
Returns the name of the element indicated by path given to it as an argument.
@method   baseName
@global



@memberof bbn.fn
@param    {String} path   The path from which the basename must be extracted
@param    {String} suffix An optional suffix that will be removed from the basename
@returns  {String} The basename of path
Returns the name of the element indicated by path given to it as an argument . @method baseName @global @memberof bbn . fn @param { String } path The path from which the basename must be extracted @param { String } suffix An optional suffix that will be removed from the basename @returns { String } The basename of path
baseName(path, suffix){
      if (path && bbn.fn.isString(path)) {
        let bits = path.split("/");
        let res = bits.pop();
        if (!suffix) {
          return res;
        }
        let len = suffix.length;
        if (res && bbn.fn.substr(res, -len) === suffix) {
          return bbn.fn.substr(res, 0, res.length - len);
        }
      }
      return '';
    }
baseName ( path , suffix ) { if ( path && bbn . fn . isString ( path ) ) { let bits = path . split ( "/" ) ; let res = bits . pop ( ) ; if ( ! suffix ) { return res ; } let len = suffix . length ; if ( res && bbn . fn . substr ( res , - len ) === suffix ) { return bbn . fn . substr ( res , 0 , res . length - len ) ; } } return '' ; }
Returns the name of the element indicated by path given to it as an argument.
Returns the name of the element indicated by path given to it as an argument .