New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sapphire/stopwatch

Package Overview
Dependencies
Maintainers
0
Versions
885
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sapphire/stopwatch - npm Package Compare versions

Comparing version 1.5.3-next.b4ae08a3 to 1.5.3-next.b77ee28f

45

dist/iife/index.global.js

@@ -5,26 +5,12 @@ var SapphireStopwatch = (function (exports) {

var __defProp = Object.defineProperty;
var __typeError = (msg) => {
throw TypeError(msg);
};
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
var __publicField = (obj, key, value) => {
__defNormalProp(obj, key + "" , value);
return value;
};
var __accessCheck = (obj, member, msg) => {
if (!member.has(obj))
throw TypeError("Cannot " + msg);
};
var __privateGet = (obj, member, getter) => {
__accessCheck(obj, member, "read from private field");
return getter ? getter.call(obj) : member.get(obj);
};
var __privateAdd = (obj, member, value) => {
if (member.has(obj))
throw TypeError("Cannot add the same private member more than once");
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
};
var __privateSet = (obj, member, value, setter) => {
__accessCheck(obj, member, "write to private field");
member.set(obj, value);
return value;
};
var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj));
var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), member.set(obj, value), value);

@@ -45,7 +31,7 @@ // src/index.ts

*/
__privateAdd(this, _start, void 0);
__privateAdd(this, _start);
/**
* The end time of this stopwatch
*/
__privateAdd(this, _end, void 0);
__privateAdd(this, _end);
this.digits = digits;

@@ -97,4 +83,3 @@ __privateSet(this, _start, performance.now());

stop() {
if (this.running)
__privateSet(this, _end, performance.now());
if (this.running) __privateSet(this, _end, performance.now());
return this;

@@ -107,6 +92,4 @@ }

const time = this.duration;
if (time >= 1e3)
return `${(time / 1e3).toFixed(this.digits)}s`;
if (time >= 1)
return `${time.toFixed(this.digits)}ms`;
if (time >= 1e3) return `${(time / 1e3).toFixed(this.digits)}s`;
if (time >= 1) return `${time.toFixed(this.digits)}ms`;
return `${(time * 1e3).toFixed(this.digits)}\u03BCs`;

@@ -125,3 +108,3 @@ }

})({});
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.global.js.map
//# sourceMappingURL=index.global.js.map
{
"name": "@sapphire/stopwatch",
"version": "1.5.3-next.b4ae08a3",
"version": "1.5.3-next.b77ee28f",
"description": "Accurately measure passing time.",

@@ -29,3 +29,3 @@ "author": "@sapphire",

"build": "tsup && yarn build:rename-cjs-index",
"build:rename-cjs-index": "tsx --tsconfig ../../scripts/tsconfig.json ../../scripts/rename-cjs-index.cts",
"build:rename-cjs-index": "tsx ../../scripts/rename-cjs-index.cts",
"docs": "typedoc-json-parser",

@@ -37,3 +37,3 @@ "prepack": "yarn build",

"dependencies": {
"tslib": "^2.6.2"
"tslib": "^2.6.3"
},

@@ -69,13 +69,13 @@ "repository": {

"devDependencies": {
"@favware/cliff-jumper": "^4.0.1",
"@favware/cliff-jumper": "^4.0.3",
"@types/jsdom": "^21.1.7",
"@vitest/coverage-v8": "^1.6.0",
"jsdom": "^24.1.0",
"tsup": "^8.0.2",
"tsx": "^4.11.0",
"@vitest/coverage-v8": "^2.0.5",
"jsdom": "^24.1.1",
"tsup": "^8.2.4",
"tsx": "^4.17.0",
"typedoc": "^0.25.13",
"typedoc-json-parser": "^10.0.0",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
"typescript": "~5.4.5",
"vitest": "^2.0.5"
}
}

@@ -10,3 +10,2 @@ <div align="center">

[![GitHub](https://img.shields.io/github/license/sapphiredev/utilities)](https://github.com/sapphiredev/utilities/blob/main/LICENSE.md)
[![codecov](https://codecov.io/gh/sapphiredev/utilities/branch/main/graph/badge.svg?token=OEGIV6RFDO)](https://codecov.io/gh/sapphiredev/utilities)
[![npm bundle size](https://img.shields.io/bundlephobia/min/@sapphire/stopwatch?logo=webpack&style=flat-square)](https://bundlephobia.com/result?p=@sapphire/stopwatch)

@@ -13,0 +12,0 @@ [![npm](https://img.shields.io/npm/v/@sapphire/stopwatch?color=crimson&logo=npm&style=flat-square)](https://www.npmjs.com/package/@sapphire/stopwatch)

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

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