perf: fastApply

This commit is contained in:
cha0s 2019-05-02 21:26:32 -05:00
parent 8f22306f0a
commit 497b4219e4

View File

@ -2,7 +2,7 @@ import * as I from 'immutable';
import D from 'debug';
import without from 'lodash.without';
import {compose, EventEmitter} from '@avocado/core';
import {compose, EventEmitter, fastApply} from '@avocado/core';
import {Resource} from '@avocado/resource';
import {Synchronized} from '@avocado/state';
@ -163,7 +163,7 @@ export class Entity extends decorate(Resource) {
return results;
}
for (const {fn, type} of this._hooks[hook]) {
results[type] = fn(...args);
results[type] = fastApply(null, fn, args);
}
return results;
}