MCPcopy Create free account
hub / github.com/breck7/scroll / slash

Function slash

external/.d3.js:13813–13820  ·  view source on GitHub ↗
(path, i)

Source from the content-addressed store, hash-verified

13811// count the number of preceding backslashes escaping the forward slash: an odd
13812// number indicates an escaped forward slash.
13813function slash(path, i) {
13814 if (path[i] === "/") {
13815 let k = 0;
13816 while (i > 0 && path[--i] === "\\") ++k;
13817 if ((k & 1) === 0) return true;
13818 }
13819 return false;
13820}
13821
13822function defaultSeparation(a, b) {
13823 return a.parent === b.parent ? 1 : 2;

Callers 2

normalize$1Function · 0.85
parentofFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected