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

@opencreek/ext

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencreek/ext - npm Package Compare versions

Comparing version 2.7.1 to 2.7.2--canary.35.7275004788.0

4

build/StopWatch.js

@@ -18,3 +18,3 @@ "use strict";

const latestTask = this.tasks[this.tasks.length - 1];
if (latestTask?.elapsed === undefined) {
if (latestTask != null && latestTask?.elapsed == null) {
this.stop();

@@ -29,3 +29,3 @@ }

const latestTask = this.tasks[this.tasks.length - 1];
if (latestTask?.elapsed === undefined) {
if (latestTask != null && latestTask?.elapsed == null) {
latestTask.elapsed = new Date().valueOf() - latestTask.start;

@@ -32,0 +32,0 @@ }

@@ -21,2 +21,15 @@ "use strict";

});
(0, ava_1.default)("StopWatch should be able to be started later", async (t) => {
const sw = new StopWatch_1.StopWatch();
sw.start("1");
await (0, sleep_1.sleep)(1000);
sw.start("2");
await (0, sleep_1.sleep)(1500);
sw.start("3");
await (0, sleep_1.sleep)(100);
sw.stop();
t.is(sw.tasks.length, 3);
t.true(sw.toString() !== "");
console.log(sw.toString());
});
//# sourceMappingURL=StopWatch.test.js.map
{
"name": "@opencreek/ext",
"version": "2.7.1",
"version": "2.7.2--canary.35.7275004788.0",
"description": "",

@@ -5,0 +5,0 @@ "main": "build/index.js",

@@ -18,1 +18,16 @@ import test from "ava"

})
test("StopWatch should be able to be started later", async (t) => {
const sw = new StopWatch()
sw.start("1")
await sleep(1000)
sw.start("2")
await sleep(1500)
sw.start("3")
await sleep(100)
sw.stop()
t.is(sw.tasks.length, 3)
t.true(sw.toString() !== "")
console.log(sw.toString())
})

@@ -25,3 +25,3 @@ import { tableToString } from "./table"

const latestTask = this.tasks[this.tasks.length - 1]
if (latestTask?.elapsed === undefined) {
if (latestTask != null && latestTask?.elapsed == null) {
this.stop()

@@ -38,3 +38,3 @@ }

const latestTask = this.tasks[this.tasks.length - 1]
if (latestTask?.elapsed === undefined) {
if (latestTask != null && latestTask?.elapsed == null) {
latestTask.elapsed = new Date().valueOf() - latestTask.start

@@ -41,0 +41,0 @@ }

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