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

superfly-timeline

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

superfly-timeline - npm Package Compare versions

Comparing version 9.0.0-nightly-wip-big-rewrite-20230814-192948-870dbc7.0 to 9.0.0-nightly-wip-big-rewrite-20230818-064242-241b192.0

12

dist/resolver/lib/performance.d.ts
export declare function activatePerformanceDebugging(activate: boolean): void;
export declare const performance: {
now: (this: void) => number;
};
/**
* This is a little wierd, but we don't want to import performance from 'perf_hooks' directly,
* because that will cause issues when this library is used in a browser.
* Intended usage:
* import { performance } from 'perf_hooks'
* setPerformanceTimeFunction(performance.now)
* @param now
*/
export declare function setPerformanceTimeFunction(now: () => number): void;
/**
* Used to measure performance.

@@ -4,0 +16,0 @@ * Starts a measurement, returns a function that should be called when the measurement is done.

26

dist/resolver/lib/performance.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ticTocPrint = exports.tic = exports.activatePerformanceDebugging = void 0;
const perf_hooks_1 = require("perf_hooks");
exports.ticTocPrint = exports.tic = exports.setPerformanceTimeFunction = exports.performance = exports.activatePerformanceDebugging = void 0;
let durations = {};

@@ -13,2 +12,17 @@ let callCounts = {};

exports.activatePerformanceDebugging = activatePerformanceDebugging;
exports.performance = {
now: Date.now,
};
/**
* This is a little wierd, but we don't want to import performance from 'perf_hooks' directly,
* because that will cause issues when this library is used in a browser.
* Intended usage:
* import { performance } from 'perf_hooks'
* setPerformanceTimeFunction(performance.now)
* @param now
*/
function setPerformanceTimeFunction(now) {
exports.performance.now = now;
}
exports.setPerformanceTimeFunction = setPerformanceTimeFunction;
function noop() {

@@ -25,3 +39,3 @@ // nothing

if (!firstStartTime)
firstStartTime = perf_hooks_1.performance.now();
firstStartTime = exports.performance.now();
if (!durations[id])

@@ -31,5 +45,5 @@ durations[id] = 0;

callCounts[id] = 0;
const startTime = perf_hooks_1.performance.now();
const startTime = exports.performance.now();
return () => {
const duration = perf_hooks_1.performance.now() - startTime;
const duration = exports.performance.now() - startTime;
durations[id] = durations[id] + duration;

@@ -43,3 +57,3 @@ callCounts[id]++;

return;
const totalDuration = perf_hooks_1.performance.now() - firstStartTime;
const totalDuration = exports.performance.now() - firstStartTime;
const maxKeyLength = Math.max(...Object.keys(durations).map((k) => k.length));

@@ -46,0 +60,0 @@ console.log('ticTocPrint\n' +

{
"name": "superfly-timeline",
"version": "9.0.0-nightly-wip-big-rewrite-20230814-192948-870dbc7.0",
"version": "9.0.0-nightly-wip-big-rewrite-20230818-064242-241b192.0",
"description": "A collection of rules as well as a resolver for placing objects on a virtual timeline.",

@@ -5,0 +5,0 @@ "license": "MIT",

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

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