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

Function translatePosition

third_party/inputmask/inputmask.js:2202–2207  ·  view source on GitHub ↗
(pos)

Source from the content-addressed store, hash-verified

2200 }
2201 function caret(input, begin, end, notranslate) {
2202 function translatePosition(pos) {
2203 if (isRTL && typeof pos === "number" && (!opts.greedy || opts.placeholder !== "") && el) {
2204 pos = el.inputmask._valueGet().length - pos;
2205 }
2206 return pos;
2207 }
2208 var range;
2209 if (begin !== undefined) {
2210 if ($.isArray(begin)) {

Callers 1

caretFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected