MCPcopy Create free account
hub / github.com/ampproject/amphtml / staticCanMatchDefinition

Function staticCanMatchDefinition

third_party/inputmask/inputmask.js:904–908  ·  view source on GitHub ↗
(source, target)

Source from the content-addressed store, hash-verified

902 return source.match.def === target.match.nativeDef;
903 }
904 function staticCanMatchDefinition(source, target) {
905 var sloc = source.locator.slice(source.alternation).join(""), tloc = target.locator.slice(target.alternation).join(""), canMatch = sloc == tloc;
906 canMatch = canMatch && source.match.fn === null && target.match.fn !== null ? target.match.fn.test(source.match.def, getMaskSet(), pos, false, opts, false) : false;
907 return canMatch;
908 }
909 function setMergeLocators(targetMatch, altMatch) {
910 if (altMatch === undefined || targetMatch.alternation === altMatch.alternation && targetMatch.locator[targetMatch.alternation].toString().indexOf(altMatch.locator[altMatch.alternation]) === -1) {
911 targetMatch.mloc = targetMatch.mloc || {};

Callers 1

handleMatchFunction · 0.85

Calls 2

getMaskSetFunction · 0.85
testMethod · 0.45

Tested by

no test coverage detected