Socket
Socket
Sign inDemoInstall

marky

Package Overview
Dependencies
0
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.0 to 1.1.1

25

dist/marky.js

@@ -20,6 +20,10 @@ (function (exports) {

var supportsMarkMeasure = typeof performance !== 'undefined' && performance.mark && performance.measure;
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
// simple binary sort insertion
function insertSorted (arr, item, comparator) {
function insertSorted (arr, item) {
var low = 0;

@@ -29,4 +33,4 @@ var high = arr.length;

while (low < high) {
mid = (low + high) >>> 1;
if (comparator(arr[mid]) < comparator(item)) {
mid = (low + high) >>> 1; // like (num / 2) but faster
if (arr[mid].startTime < item.startTime) {
low = mid + 1;

@@ -40,11 +44,4 @@ } else {

/* global performance */
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
if (supportsMarkMeasure) {
if (typeof performance !== 'undefined' &&
performance.mark && performance.measure) {
exports.mark = function (name) {

@@ -86,3 +83,3 @@ throwIfEmpty(name);

// we just have no limit, per Chrome and Edge's de-facto behavior
insertSorted(entries, entry, function (x) { return x.startTime; });
insertSorted(entries, entry);
return entry

@@ -89,0 +86,0 @@ };

@@ -1,1 +0,1 @@

!function(r){"use strict";function e(r,e,n){for(var t,a=0,o=r.length;a<o;)t=a+o>>>1,n(r[t])<n(e)?a=t+1:o=t;r.splice(a,0,e)}function n(r){if(!r)throw new Error("name must be non-empty")}var t;t="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return Date.now()};var a=t,o="undefined"!=typeof performance&&performance.mark&&performance.measure;if(o)r.mark=function(r){n(r),performance.mark("start "+r)},r.stop=function(r){n(r),performance.mark("end "+r),performance.measure(r,"start "+r,"end "+r);var e=performance.getEntriesByName(r);return e[e.length-1]},r.getEntries=function(){return performance.getEntriesByType("measure")};else{var f={},m=[];r.mark=function(r){var e=a();n(r),f["$"+r]=e},r.stop=function(r){var t=a();n(r);var o=f["$"+r];if(!o)throw new Error("no known mark: "+r);var i={startTime:o,name:r,duration:t-o,entryType:"measure"};return e(m,i,function(r){return r.startTime}),i},r.getEntries=function(){return m}}}(this.marky=this.marky||{});
!function(r){"use strict";function e(r){if(!r)throw new Error("name must be non-empty")}function n(r,e){for(var n,t=0,a=r.length;t<a;)n=t+a>>>1,r[n].startTime<e.startTime?t=n+1:a=n;r.splice(t,0,e)}var t;t="undefined"!=typeof performance&&performance.now?function(){return performance.now()}:function(){return Date.now()};var a=t;if("undefined"!=typeof performance&&performance.mark&&performance.measure)r.mark=function(r){e(r),performance.mark("start "+r)},r.stop=function(r){e(r),performance.mark("end "+r),performance.measure(r,"start "+r,"end "+r);var n=performance.getEntriesByName(r);return n[n.length-1]},r.getEntries=function(){return performance.getEntriesByType("measure")};else{var o={},m=[];r.mark=function(r){var n=a();e(r),o["$"+r]=n},r.stop=function(r){var t=a();e(r);var f=o["$"+r];if(!f)throw new Error("no known mark: "+r);var i={startTime:f,name:r,duration:t-f,entryType:"measure"};return n(m,i),i},r.getEntries=function(){return m}}}(this.marky=this.marky||{});

@@ -21,6 +21,10 @@ 'use strict';

var supportsMarkMeasure = typeof performance !== 'undefined' && performance.mark && performance.measure;
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
// simple binary sort insertion
function insertSorted (arr, item, comparator) {
function insertSorted (arr, item) {
var low = 0;

@@ -30,4 +34,4 @@ var high = arr.length;

while (low < high) {
mid = (low + high) >>> 1;
if (comparator(arr[mid]) < comparator(item)) {
mid = (low + high) >>> 1; // like (num / 2) but faster
if (arr[mid].startTime < item.startTime) {
low = mid + 1;

@@ -41,11 +45,4 @@ } else {

/* global performance */
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
if (supportsMarkMeasure) {
if (typeof performance !== 'undefined' &&
performance.mark && performance.measure) {
exports.mark = function (name) {

@@ -87,3 +84,3 @@ throwIfEmpty(name);

// we just have no limit, per Chrome and Edge's de-facto behavior
insertSorted(entries, entry, function (x) { return x.startTime; });
insertSorted(entries, entry);
return entry

@@ -90,0 +87,0 @@ };

@@ -17,6 +17,10 @@ /* global performance */

var supportsMarkMeasure = typeof performance !== 'undefined' && performance.mark && performance.measure;
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
// simple binary sort insertion
function insertSorted (arr, item, comparator) {
function insertSorted (arr, item) {
var low = 0;

@@ -26,4 +30,4 @@ var high = arr.length;

while (low < high) {
mid = (low + high) >>> 1;
if (comparator(arr[mid]) < comparator(item)) {
mid = (low + high) >>> 1; // like (num / 2) but faster
if (arr[mid].startTime < item.startTime) {
low = mid + 1;

@@ -37,10 +41,2 @@ } else {

/* global performance */
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
var mark;

@@ -50,3 +46,4 @@ var stop;

if (supportsMarkMeasure) {
if (typeof performance !== 'undefined' &&
performance.mark && performance.measure) {
mark = function (name) {

@@ -88,3 +85,3 @@ throwIfEmpty(name);

// we just have no limit, per Chrome and Edge's de-facto behavior
insertSorted(entries, entry, function (x) { return x.startTime; });
insertSorted(entries, entry);
return entry

@@ -91,0 +88,0 @@ };

@@ -25,6 +25,10 @@ 'use strict';

var supportsMarkMeasure = typeof performance !== 'undefined' && performance.mark && performance.measure;
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
// simple binary sort insertion
function insertSorted (arr, item, comparator) {
function insertSorted (arr, item) {
var low = 0;

@@ -34,4 +38,4 @@ var high = arr.length;

while (low < high) {
mid = (low + high) >>> 1;
if (comparator(arr[mid]) < comparator(item)) {
mid = (low + high) >>> 1; // like (num / 2) but faster
if (arr[mid].startTime < item.startTime) {
low = mid + 1;

@@ -45,11 +49,4 @@ } else {

/* global performance */
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
if (supportsMarkMeasure) {
if (typeof performance !== 'undefined' &&
performance.mark && performance.measure) {
exports.mark = function (name) {

@@ -91,3 +88,3 @@ throwIfEmpty(name);

// we just have no limit, per Chrome and Edge's de-facto behavior
insertSorted(entries, entry, function (x) { return x.startTime; });
insertSorted(entries, entry);
return entry

@@ -94,0 +91,0 @@ };

@@ -21,6 +21,10 @@ /* global performance */

var supportsMarkMeasure = typeof performance !== 'undefined' && performance.mark && performance.measure;
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
// simple binary sort insertion
function insertSorted (arr, item, comparator) {
function insertSorted (arr, item) {
var low = 0;

@@ -30,4 +34,4 @@ var high = arr.length;

while (low < high) {
mid = (low + high) >>> 1;
if (comparator(arr[mid]) < comparator(item)) {
mid = (low + high) >>> 1; // like (num / 2) but faster
if (arr[mid].startTime < item.startTime) {
low = mid + 1;

@@ -41,10 +45,2 @@ } else {

/* global performance */
function throwIfEmpty (name) {
if (!name) {
throw new Error('name must be non-empty')
}
}
var mark;

@@ -54,3 +50,4 @@ var stop;

if (supportsMarkMeasure) {
if (typeof performance !== 'undefined' &&
performance.mark && performance.measure) {
mark = function (name) {

@@ -92,3 +89,3 @@ throwIfEmpty(name);

// we just have no limit, per Chrome and Edge's de-facto behavior
insertSorted(entries, entry, function (x) { return x.startTime; });
insertSorted(entries, entry);
return entry

@@ -95,0 +92,0 @@ };

{
"name": "marky",
"version": "1.1.0",
"version": "1.1.1",
"description": "Performance timer based on performance.mark() and measure()",

@@ -5,0 +5,0 @@ "main": "lib/marky.cjs.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc