willtheorangeguy / willtheorangeguy.github.io

Prefer var declarations be placed at the top of their scope JS-0102
Anti-pattern
Minor
4 months ago2 years old
All 'var' declarations must be at the top of the function scope
 105    typeCheckConfig: function (t, e, n) {
 106      for (var i in n)
 107        if (Object.prototype.hasOwnProperty.call(n, i)) {
 108          var o = n[i], 109            r = e[i], 110            a = 111              r && l.isElement(r) 112                ? "element" 113                : (s = r) === null || typeof s == "undefined" 114                  ? "" + s 115                  : {}.toString 116                      .call(s) 117                      .match(/\s([a-z]+)/i)[1] 118                      .toLowerCase(); 119          if (!new RegExp(o).test(a))
 120            throw new Error(
 121              t.toUpperCase() +
All 'var' declarations must be at the top of the function scope
4210          if (
4211            (this._element.classList.remove("show"), this._config.animation)
4212          ) {
4213            var n = l.getTransitionDurationFromElement(this._element);4214            i.default(this._element)
4215              .one(l.TRANSITION_END, e)
4216              .emulateTransitionEnd(n);
All 'var' declarations must be at the top of the function scope
4165        }),
4166        (e.hide = function () {
4167          if (this._element.classList.contains("show")) {
4168            var t = i.default.Event("hide.bs.toast");4169            i.default(this._element).trigger(t),
4170              t.isDefaultPrevented() || this._close();
4171          }
All 'var' declarations must be at the top of the function scope
4156              this._element.classList.add("showing"),
4157              this._config.animation)
4158            ) {
4159              var o = l.getTransitionDurationFromElement(this._element);4160              i.default(this._element)
4161                .one(l.TRANSITION_END, n)
4162                .emulateTransitionEnd(o);
All 'var' declarations must be at the top of the function scope
4141          if ((i.default(this._element).trigger(e), !e.isDefaultPrevented())) {
4142            this._clearTimeout(),
4143              this._config.animation && this._element.classList.add("fade");
4144            var n = function () {4145              t._element.classList.remove("showing"),4146                t._element.classList.add("show"),4147                i.default(t._element).trigger("shown.bs.toast"),4148                t._config.autohide &&4149                  (t._timeout = setTimeout(function () {4150                    t.hide();4151                  }, t._config.delay));4152            };4153            if (
4154              (this._element.classList.remove("hide"),
4155              l.reflow(this._element),