MCPcopy Create free account
hub / github.com/Stuk/jszip / forceTrailingSlash

Function forceTrailingSlash

lib/object.js:123–129  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

121 * @return {String} the path with a trailing slash.
122 */
123var forceTrailingSlash = function(path) {
124 // Check the name ends with a /
125 if (path.slice(-1) !== "/") {
126 path += "/"; // IE doesn't like substr(-1)
127 }
128 return path;
129};
130
131/**
132 * Add a (sub) folder in the current folder.

Callers 2

fileAddFunction · 0.85
folderAddFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected