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

Function isSelection

third_party/inputmask/inputmask.js:1294–1296  ·  view source on GitHub ↗
(posObj)

Source from the content-addressed store, hash-verified

1292 }
1293 function isValid(pos, c, strict, fromSetValid, fromAlternate, validateOnly) {
1294 function isSelection(posObj) {
1295 return isRTL ? posObj.begin - posObj.end > 1 || posObj.begin - posObj.end === 1 : posObj.end - posObj.begin > 1 || posObj.end - posObj.begin === 1;
1296 }
1297 strict = strict === true;
1298 var maskPos = pos;
1299 if (pos.begin !== undefined) {

Callers 2

_isValidFunction · 0.85
isValidFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected