MCPcopy Create free account
hub / github.com/TruthHun/BookStack / parentFolder

Function parentFolder

static/word2md/mammoth.browser.js:12943–12949  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

12941 * @return {string} the parent folder, or ""
12942 */
12943var parentFolder = function (path) {
12944 if (path.slice(-1) == '/') {
12945 path = path.substring(0, path.length - 1);
12946 }
12947 var lastSlash = path.lastIndexOf('/');
12948 return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
12949};
12950
12951
12952/**

Callers 1

fileAddFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected