Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-perf-devtool

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-perf-devtool - npm Package Compare versions

Comparing version 3.0.0-beta2 to 3.0.0-beta3

2

package.json
{
"name": "react-perf-devtool",
"version": "3.0.0-beta2",
"version": "3.0.0-beta3",
"description":

@@ -5,0 +5,0 @@ "A chrome devtool extension for inspecting performance of React Components",

var getReactPerformanceData = require('../shared/parse')
var generateDataFromMeasures = require('../shared/generate')
// var options = {
// logToConsole: false
// }
function registerListener(options) {
var observer = new window.PerformanceObserver(list => {
var observer = new window.PerformanceObserver(list => {
// window.__REACT_PERF_DEVTOOL_GLOBAL_STORE___ = list.getEntries()

@@ -21,3 +17,3 @@

if (options.logToConsole) {
if (options.log) {
logToConsole(measures)

@@ -33,12 +29,11 @@ }

function logToConsole(measures) {
measures.forEach((measure) => {
window.navigator.sendBeacon(
'http://127.0.0.1:3000', {
name: measure.componentName,
render: measure.render,
update: measure.update,
mount: measure.mount,
unmount: measure.unmount
}
)
measures.forEach(({ componentName, mount, render, update }) => {
const data = {
componentName,
mount,
render,
update,
}
window.navigator.sendBeacon('http://127.0.0.1:3000', JSON.stringify(data))
})

@@ -45,0 +40,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc