MCPcopy
hub / github.com/digitalbazaar/jsonld.js / consume

Function consume

tests/webidl/WebIDLParser.js:65–72  ·  view source on GitHub ↗
(type, value)

Source from the content-addressed store, hash-verified

63 var last_token = null;
64
65 var consume = function(type, value) {
66 if (!tokens.length || tokens[0].type !== type) return;
67 if (typeof value === "undefined" || tokens[0].value === value) {
68 last_token = tokens.shift();
69 if (type === ID) last_token.value = last_token.value.replace(/^_/, "");
70 return last_token;
71 }
72 };
73
74 var ws = function() {
75 if (!tokens.length) return;

Callers 15

integer_typeFunction · 0.85
float_typeFunction · 0.85
primitive_typeFunction · 0.85
const_valueFunction · 0.85
type_suffixFunction · 0.85
single_typeFunction · 0.85
union_typeFunction · 0.85
argumentFunction · 0.85
argument_listFunction · 0.85
simple_extended_attrFunction · 0.85
extended_attrsFunction · 0.85
default_Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected