Repository URL to install this package:
|
Version:
3.12.2 ▾
|
var getItemPath = function getItemPath(item) {
var _item$url;
if ((_item$url = item.url) !== null && _item$url !== void 0 && _item$url.path || item.path) {
var _item$url2;
var wholePath = ((_item$url2 = item.url) === null || _item$url2 === void 0 ? void 0 : _item$url2.path) || item.path;
var lastFolderSeparatorIndex = wholePath.lastIndexOf('/');
return wholePath.substr(0, lastFolderSeparatorIndex) || '/';
}
};
export default getItemPath;