MCPcopy
hub / github.com/louischatriot/nedb / resolve

Function resolve

browser-version/out/nedb.js:5289–5303  ·  view source on GitHub ↗
(child)

Source from the content-addressed store, hash-verified

5287 return seen[name] = exports || value;
5288
5289 function resolve(child) {
5290 if (child.charAt(0) !== '.') { return child; }
5291 var parts = child.split("/");
5292 var parentBase = name.split("/").slice(0, -1);
5293
5294 for (var i=0, l=parts.length; i<l; i++) {
5295 var part = parts[i];
5296
5297 if (part === '..') { parentBase.pop(); }
5298 else if (part === '.') { continue; }
5299 else { parentBase.push(part); }
5300 }
5301
5302 return parentBase.join("/");
5303 }
5304 };
5305})();
5306

Callers 15

nedb.jsFile · 0.70
allFunction · 0.70
resolveAllFunction · 0.70
resolvePromiseFunction · 0.70
invokeCallbackFunction · 0.70
handleThenableFunction · 0.70
raceFunction · 0.70
_blobAjaxFunction · 0.70
_encodeBlobFunction · 0.70
_getConnectionFunction · 0.70
getItemFunction · 0.70

Calls 2

fulfillFunction · 0.70
handleThenableFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…