MCPcopy Index your code
hub / github.com/ampproject/amphtml / Inputmask

Function Inputmask

third_party/inputmask/inputmask.js:11–32  ·  view source on GitHub ↗
(alias, options, internal)

Source from the content-addressed store, hash-verified

9export function factory($, window, document, undefined) {
10 var ua = navigator.userAgent, ie = ua.indexOf("MSIE ") > 0 || ua.indexOf("Trident/") > 0, mobile = isInputEventSupported("touchstart"), iemobile = /iemobile/i.test(ua), iphone = /iphone/i.test(ua) && !iemobile;
11 function Inputmask(alias, options, internal) {
12 if (!(this instanceof Inputmask)) {
13 return new Inputmask(alias, options, internal);
14 }
15 this.el = undefined;
16 this.events = {};
17 this.maskset = undefined;
18 this.refreshValue = false;
19 if (internal !== true) {
20 if ($.isPlainObject(alias)) {
21 options = alias;
22 } else {
23 options = options || {};
24 if (alias) options.alias = alias;
25 }
26 this.opts = $.extend(true, {}, this.defaults, options);
27 this.noMasksCache = options && options.definitions !== undefined;
28 this.userOptions = options || {};
29 this.isRTL = this.opts.numericInput;
30 resolveAlias(this.opts.alias, options, this.opts);
31 }
32 }
33 Inputmask.prototype = {
34 dataAttribute: "data-inputmask",
35 defaults: {

Callers 1

factoryFunction · 0.85

Calls 1

resolveAliasFunction · 0.85

Tested by

no test coverage detected