Require spread operators instead of .apply() JS-0245
Anti-pattern
Minor
5 months ago3 years old
Use the spread operator instead of '.apply()'
 7858        e.history.route(t, function (i) {
 7859          const a = s._extractParameters(t, i)
 7860          !1 !== s.execute(r, a, n) &&
 7861              (s.trigger.apply(s, ['route:' + n].concat(a)), 7862              s.trigger('route', n, a),
 7863              e.history.trigger('route', s, n, a))
 7864        }),
Use the spread operator instead of '.apply()'
 7840    this.preinitialize.apply(this, arguments),
 7841    t.routes && (this.routes = t.routes),
 7842    this._bindRoutes(),
 7843    this.initialize.apply(this, arguments) 7844  })
 7845  const U = /\((.*?)\)/g
 7846  const z = /(\(\?)?:\w+/g
Use the spread operator instead of '.apply()'
 7837  }
 7838  const O = (e.Router = function (t) {
 7839    t || (t = {}),
 7840    this.preinitialize.apply(this, arguments), 7841    t.routes && (this.routes = t.routes),
 7842    this._bindRoutes(),
 7843    this.initialize.apply(this, arguments)
Use the spread operator instead of '.apply()'
 7833    read: 'GET'
 7834  }
 7835  e.ajax = function () {
 7836    return e.$.ajax.apply(e.$, arguments) 7837  }
 7838  const O = (e.Router = function (t) {
 7839    t || (t = {}),
Use the spread operator instead of '.apply()'
 7575    this.preinitialize.apply(this, arguments),
 7576    i.extend(this, i.pick(t, H)),
 7577    this._ensureElement(),
 7578    this.initialize.apply(this, arguments) 7579  })
 7580  const P = /^(\S+)\s*(.*)$/
 7581  var H = [