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

Function forceTrailingSlash

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

Source from the content-addressed store, hash-verified

12956 * @return {String} the path with a trailing slash.
12957 */
12958var forceTrailingSlash = function(path) {
12959 // Check the name ends with a /
12960 if (path.slice(-1) != "/") {
12961 path += "/"; // IE doesn't like substr(-1)
12962 }
12963 return path;
12964};
12965/**
12966 * Add a (sub) folder in the current folder.
12967 * @private

Callers 2

fileAddFunction · 0.70
folderAddFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected