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

Function seekPrevious

third_party/inputmask/inputmask.js:1530–1536  ·  view source on GitHub ↗
(pos, newBlock)

Source from the content-addressed store, hash-verified

1528 return position;
1529 }
1530 function seekPrevious(pos, newBlock) {
1531 var position = pos, tests;
1532 if (position <= 0) return 0;
1533 while (--position > 0 && (newBlock === true && getTest(position).match.newBlockMarker !== true || newBlock !== true && !isMask(position) && (tests = getTests(position),
1534 tests.length < 2 || tests.length === 2 && tests[1].match.def === ""))) {}
1535 return position;
1536 }
1537 function writeBuffer(input, buffer, caretPos, event, triggerEvents) {
1538 if (event && $.isFunction(opts.onBeforeWrite)) {
1539 var result = opts.onBeforeWrite.call(inputmask, event, buffer, caretPos, opts);

Callers 3

maskScopeFunction · 0.85
isCompleteFunction · 0.85
handleRemoveFunction · 0.85

Calls 3

getTestFunction · 0.85
isMaskFunction · 0.85
getTestsFunction · 0.85

Tested by

no test coverage detected