Created cli command. Updated tracker script.
This commit is contained in:
10
lib/web.js
10
lib/web.js
@@ -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);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user