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 }),
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
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)
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 = {}),
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 = [
Before ES2015, one must use Function.prototype.apply()
to call variadic functions.
var args = [1, 2, 3, 4];
Math.max.apply(Math, args);
In ES2015, one can use spread syntax to call variadic functions.
var args = [1, 2, 3, 4];
Math.max(...args);
foo.apply(undefined, args);
foo.apply(null, args);
obj.foo.apply(obj, args);
// Using spread syntax
foo(...args);
obj.foo(...args);
// The `this` binding is different.
foo.apply(obj, args);
obj.foo.apply(null, args);
obj.foo.apply(otherObj, args);
// The argument list is not variadic.
// Those are warned by the `no-useless-call` rule.
foo.apply(undefined, [1, 2, 3]);
foo.apply(null, [1, 2, 3]);
obj.foo.apply(obj, [1, 2, 3]);