Replaced timely dependency

This commit is contained in:
jpellizzari
2017-03-21 12:26:52 -07:00
parent 4aeeeb80c6
commit 9dfcd213c3
4 changed files with 31 additions and 3 deletions

View File

@@ -0,0 +1,11 @@
// Replacement for timely dependency
export default function timer(fn) {
const timedFn = (...args) => {
const start = new Date();
const result = fn.apply(fn, args);
timedFn.time = new Date() - start;
return result;
};
return timedFn;
}