MCPcopy
hub / github.com/bigskysoftware/htmx / matchTokenType

Function matchTokenType

www/static/test/lib/_hyperscript.js:311–319  ·  view source on GitHub ↗

* @param {string} type1 * @param {string} [type2] * @param {string} [type3] * @param {string} [type4] * @returns {Token | void}

(type1, type2, type3, type4)

Source from the content-addressed store, hash-verified

309 * @returns {Token | void}
310 */
311 function matchTokenType(type1, type2, type3, type4) {
312 if (
313 currentToken() &&
314 currentToken().type &&
315 [type1, type2, type3, type4].indexOf(currentToken().type) >= 0
316 ) {
317 return consumeToken();
318 }
319 }
320
321 /**
322 * @param {string} value

Callers 1

requireTokenTypeFunction · 0.70

Calls 2

currentTokenFunction · 0.70
consumeTokenFunction · 0.70

Tested by

no test coverage detected