MCPcopy Index your code
hub / github.com/glideapps/quicktype / getIndex

Function getIndex

src/CompressedJSON.ts:35–40  ·  view source on GitHub ↗
(v: Value, tag: Tag)

Source from the content-addressed store, hash-verified

33}
34
35function getIndex(v: Value, tag: Tag): number {
36 if (valueTag(v) !== tag) {
37 throw "Trying to get index for value with invalid tag";
38 }
39 return v >> TAG_BITS;
40}
41
42export function valueTag(v: Value): Tag {
43 return v & TAG_MASK;

Callers 1

CompressedJSONClass · 0.85

Calls 1

valueTagFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…