Created cli command. Updated tracker script.

This commit is contained in:
Mike Cao 2020-07-23 22:07:57 -07:00
parent 49a55b40b4
commit a6975ecedd
9 changed files with 120 additions and 35 deletions

View file

@ -8,3 +8,13 @@ export const post = (url, params) =>
},
body: JSON.stringify(params),
}).then(res => (res.status === 200 ? res.json() : null));
export const hook = (_this, method, callback) => {
const orig = _this[method];
return (...args) => {
callback.apply(null, args);
return orig.apply(_this, args);
};
};