diff options
author | Mark Otto <markdotto@gmail.com> | 2016-10-10 03:26:51 +0300 |
---|---|---|
committer | Mark Otto <markdotto@gmail.com> | 2016-10-10 03:26:51 +0300 |
commit | 571e86e7705ee38a4b828b0e6f24de089a69e8a9 (patch) | |
tree | 6fa1e44c68d2e18720694a34803475e172f42b64 /js/dist/util.js | |
parent | 6def7a5d56c5042a6f91361842f85f5af6e5b033 (diff) |
grunt
Diffstat (limited to 'js/dist/util.js')
-rw-r--r-- | js/dist/util.js | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/js/dist/util.js b/js/dist/util.js index eb861bdf41..3668170619 100644 --- a/js/dist/util.js +++ b/js/dist/util.js @@ -5,9 +5,7 @@ * -------------------------------------------------------------------------- */ -'use strict'; - -var Util = (function ($) { +var Util = function ($) { /** * ------------------------------------------------------------------------ @@ -28,7 +26,7 @@ var Util = (function ($) { // shoutout AngusCroll (https://goo.gl/pxwQGp) function toType(obj) { - return ({}).toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); + return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase(); } function isElement(obj) { @@ -55,9 +53,9 @@ var Util = (function ($) { var el = document.createElement('bootstrap'); - for (var _name in TransitionEndEvent) { - if (el.style[_name] !== undefined) { - return { end: TransitionEndEvent[_name] }; + for (var name in TransitionEndEvent) { + if (el.style[name] !== undefined) { + return { end: TransitionEndEvent[name] }; } } @@ -105,12 +103,11 @@ var Util = (function ($) { getUID: function getUID(prefix) { do { /* eslint-disable no-bitwise */ - prefix += ~ ~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here + prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here /* eslint-enable no-bitwise */ } while (document.getElementById(prefix)); return prefix; }, - getSelectorFromElement: function getSelectorFromElement(element) { var selector = element.getAttribute('data-target'); @@ -121,25 +118,21 @@ var Util = (function ($) { return selector; }, - reflow: function reflow(element) { new Function('bs', 'return bs')(element.offsetHeight); }, - triggerTransitionEnd: function triggerTransitionEnd(element) { $(element).trigger(transition.end); }, - supportsTransitionEnd: function supportsTransitionEnd() { return Boolean(transition); }, - typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { for (var property in configTypes) { if (configTypes.hasOwnProperty(property)) { var expectedTypes = configTypes[property]; var value = config[property]; - var valueType = undefined; + var valueType = void 0; if (value && isElement(value)) { valueType = 'element'; @@ -158,5 +151,5 @@ var Util = (function ($) { setTransitionEndSupport(); return Util; -})(jQuery); +}(jQuery); //# sourceMappingURL=util.js.map |