reactotron-core-client
Advanced tools
Comparing version 1.12.0 to 1.12.2
@@ -346,7 +346,2 @@ 'use strict'; | ||
// if we do find it, let's setup to call it | ||
var nativePerformanceNow = function nativePerformanceNow() { | ||
return nativePerformance.now(); | ||
}; | ||
// the function we're trying to assign | ||
@@ -360,4 +355,4 @@ var performanceNow = defaultPerformanceNow; | ||
// node will use a high rez timer | ||
if (hasHirezNodeTimer) { | ||
// nodejs | ||
performanceNow = process.hrtime; | ||
@@ -367,9 +362,12 @@ delta = function delta(started) { | ||
}; | ||
} else if (global.nativePerformanceNow) { | ||
// react native 47 | ||
performanceNow = global.nativePerformanceNow; | ||
} else if (nativePerformance) { | ||
performanceNow = nativePerformanceNow; | ||
// browsers + safely check for react native < 47 | ||
performanceNow = function performanceNow() { | ||
return nativePerformance.now && nativePerformance.now(); | ||
}; | ||
} | ||
// this is the interface the callers will use | ||
// export const performanceNow = nativePerformance ? nativePerformanceNow : defaultPerformanceNow | ||
/** | ||
@@ -376,0 +374,0 @@ * Starts a lame, low-res timer. Returns a function which when invoked, |
{ | ||
"name": "reactotron-core-client", | ||
"version": "1.12.0", | ||
"version": "1.12.2", | ||
"description": "Grants Reactotron clients the ability to talk to a Reactotron server.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
34186