Boolean(this.elements[e])
instead 8219 }
8220 }),
8221 (e.Set.prototype.contains = function (e) {
8222 return !!this.elements[e] 8223 }),
8224 (e.Set.prototype.intersect = function (t) {
8225 let r
Boolean(e)
instead 8063 },
8064 navigate: function (t, e) {
8065 if (!B.started) return !1;
8066 (e && !0 !== e) || (e = { trigger: !!e }), 8067 (t = this.getFragment(t || ''))
8068 let i = this.root;
8069 (t !== '' && t.charAt(0) !== '?') || (i = i.slice(0, -1) || '/')
Boolean(this.matchRoot())
instead 8054 },
8055 loadUrl: function (t) {
8056 return (
8057 !!this.matchRoot() && 8058 ((t = this.fragment = this.getFragment(t)),
8059 i.some(this.handlers, function (e) {
8060 if (e.route.test(t)) return e.callback(t), !0
Boolean(this.options.pushState)
instead 7971 (void 0 === document.documentMode || document.documentMode > 7)),
7972 (this._useHashChange =
7973 this._wantsHashChange && this._hasHashChange),
7974 (this._wantsPushState = !!this.options.pushState), 7975 (this._hasPushState = !(!this.history || !this.history.pushState)),
7976 (this._usePushState = this._wantsPushState && this._hasPushState),
7977 (this.fragment = this.getFragment()),
String(t)
instead 7437 )
7438 },
7439 pluck: function (t) {
7440 return this.map(t + '') 7441 },
7442 fetch: function (t) {
7443 const e = (t = i.extend({ parse: !0 }, t)).success
Prefer using explicit casts by calling Number
, Boolean
, or String
over using operators like +
, !!
or "" +
.
This is considered best practice as it improves readability.
const b = !!foo;
// The `+` operator does not change the value of its operand
// unless it's already a number.
let n = +foo;
n = 1 * foo;
const s = "" + foo;
const b = Boolean(foo);
const n = Number(foo);
const s = String(foo);