Skip to content

Commit 08b4ac9

Browse files
committed
1 parent e91b438 commit 08b4ac9

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

dist/jquery.maskedinput.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
55
Version: 1.3.1
66
*/
7-
!function($) {
7+
!function(factory) {
8+
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : factory("object" == typeof exports ? require("jquery") : jQuery);
9+
}(function($) {
810
function getPasteEvent() {
911
var el = document.createElement("input"), name = "onpaste";
1012
return el.setAttribute(name, ""), "function" == typeof el[name] ? "paste" : "input";
@@ -173,4 +175,4 @@
173175
}));
174176
}
175177
});
176-
}(jQuery);
178+
});

dist/jquery.maskedinput.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/jquery.maskedinput.js

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
(function($) {
1+
(function (factory) {
2+
if (typeof define === 'function' && define.amd) {
3+
// AMD. Register as an anonymous module.
4+
define(['jquery'], factory);
5+
} else if (typeof exports === 'object') {
6+
// Node/CommonJS
7+
factory(require('jquery'));
8+
} else {
9+
// Browser globals
10+
factory(jQuery);
11+
}
12+
}(function ($) {
213

314
function getPasteEvent() {
415
var el = document.createElement('input'),
@@ -415,4 +426,4 @@ $.fn.extend({
415426
});
416427
}
417428
});
418-
})(jQuery);
429+
}));

0 commit comments

Comments
 (0)