lib/data-store/resource.js
function getNameFromPath (path) {
  path = _(path).toString();
  let lastSlash = path.substring(0, path.length - 1).lastIndexOf("/");
  if (lastSlash === -1) {
    return normalizeName(path);
  }
  else {
    return normalizeName(path.substring(lastSlash));
  }
}
function getNameFromPath (path) {
  path = _(path).toString();
  let lastSlash = path.substring(0, path.length - 1).lastIndexOf("/");
  if (lastSlash === -1) {
    return normalizeName(path);
  }
  else {
    return normalizeName(path.substring(lastSlash));
  }
}
function getNameFromPath ( path ) { path = _ ( path ) . toString ( ) ; let lastSlash = path . substring ( 0 , path . length - 1 ) . lastIndexOf ( "/" ) ; if ( lastSlash === - 1 ) { return normalizeName ( path ) ; } else { return normalizeName ( path . substring ( lastSlash ) ) ; } }
Returns the normalized resource name from the given full resource path.

@param   {string}    path - The full resource path (e.g. "/restaurants/washington/seattle/joes-diner")
@returns {string}         - The normalized resource name (e.g. "/joes-diner")
Returns the normalized resource name from the given full resource path .