MCPcopy Index your code
hub / github.com/mozilla/source-map / buildUniqueSegment

Function buildUniqueSegment

lib/util.js:205–211  ·  view source on GitHub ↗
(prefix, str)

Source from the content-addressed store, hash-verified

203}
204
205function buildUniqueSegment(prefix, str) {
206 let id = 0;
207 do {
208 const ident = prefix + id++;
209 if (str.indexOf(ident) === -1) return ident;
210 } while (true);
211}
212
213function buildSafeBase(str) {
214 const maxDotParts = str.split("..").length - 1;

Callers 1

buildSafeBaseFunction · 0.85

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…