Socket
Socket
Sign inDemoInstall

react-perf-tool

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-perf-tool - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

lib/styles.css

2

package.json
{
"name": "react-perf-tool",
"version": "0.1.4",
"version": "0.1.5",
"description": "Record and debug React performance from the browser",

@@ -5,0 +5,0 @@ "main": "lib/react-perf-tool.js",

@@ -22,4 +22,4 @@ import React, { Component } from 'react';

renderChart(measurements) {
const data = measurements.map(measurement => measurement['Wasted time (ms)']);
const labels = measurements.map(measurement => measurement['Owner > component']);
const data = measurements.map(measurement => measurement.inclusiveRenderDuration);
const labels = measurements.map(measurement => measurement.key);
this.chart = new Chart(document.getElementById('perf-tool-chart-ctx'), {

@@ -26,0 +26,0 @@ type: 'bar',

@@ -5,3 +5,3 @@ import fecha from 'fecha';

export default function formatTime(time) {
return fecha.format(new Date(time), 'hh:mm:ss.SSS A');
return (new Date(time)).toTimeString().split(' ')[0];
}
import { expect } from 'chai';
import formatTime from '../../src/utils/formatTime';
xdescribe('formatTime', () => {
it('should return 12:23:02.741 PM for 1463394182741', () => {
expect(formatTime(1463394182741)).to.equal('12:23:02.741 PM');
describe('formatTime', () => {
it('should return 12:23:02 for 1463394182741', () => {
expect(formatTime(1463394182741)).to.equal('12:23:02');
});
});

@@ -5,3 +5,3 @@ import { expect } from 'chai';

describe.only('setUserSettings', () => {
describe('setUserSettings', () => {
it('should return return a settings object from mock storage', () => {

@@ -8,0 +8,0 @@ const localStorage = {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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