UNPKG

redux-user-timing

Version:
3 lines (2 loc) 637 B
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define(r):e.reduxUserTiming=r()}(this,function(){return function(){return function(e){return function(r){if(!performance||!performance.mark)return e(r);if("object"!=typeof r||!r.type||"string"!=typeof r.type)return console.error("Warning: action type is not valid. Performance measurement is not working properly."),e(r);performance.mark(r.type+"_START");var n=e(r);return performance.mark(r.type+"_END"),performance.measure(""+r.type,r.type+"_START",r.type+"_END"),n}}}}); //# sourceMappingURL=index.umd.js.map