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

probe.gl

Package Overview
Dependencies
Maintainers
6
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

probe.gl - npm Package Compare versions

Comparing version 3.1.0-alpha.8 to 3.1.0-alpha.9

3

dist/es5/lib/stat.js

@@ -17,5 +17,6 @@ "use strict";

var Stat = function () {
function Stat(name, samples) {
function Stat(name, type) {
(0, _classCallCheck2["default"])(this, Stat);
this.name = name;
this.type = type;
this.sampleSize = 1;

@@ -22,0 +23,0 @@ this.reset();

@@ -28,6 +28,12 @@ "use strict";

value: function get(name) {
this.stats[name] = this.stats[name] || new _stat["default"](name);
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'count';
this.stats[name] = this.stats[name] || new _stat["default"](name, type);
return this.stats[name];
}
}, {
key: "size",
value: function size() {
return Object.keys(this.stats).length;
}
}, {
key: "reset",

@@ -34,0 +40,0 @@ value: function reset() {

import getHiResTimestamp from '../utils/hi-res-timestamp';
export default class Stat {
constructor(name, samples) {
constructor(name, type) {
this.name = name;
this.type = type;
this.sampleSize = 1;

@@ -6,0 +7,0 @@ this.reset();

@@ -11,6 +11,11 @@ import Stat from './stat';

get(name) {
this.stats[name] = this.stats[name] || new Stat(name);
let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'count';
this.stats[name] = this.stats[name] || new Stat(name, type);
return this.stats[name];
}
size() {
return Object.keys(this.stats).length;
}
reset() {

@@ -17,0 +22,0 @@ for (const key in this.stats) {

@@ -6,6 +6,7 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

var Stat = function () {
function Stat(name, samples) {
function Stat(name, type) {
_classCallCheck(this, Stat);
this.name = name;
this.type = type;
this.sampleSize = 1;

@@ -12,0 +13,0 @@ this.reset();

@@ -19,6 +19,12 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";

value: function get(name) {
this.stats[name] = this.stats[name] || new Stat(name);
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'count';
this.stats[name] = this.stats[name] || new Stat(name, type);
return this.stats[name];
}
}, {
key: "size",
value: function size() {
return Object.keys(this.stats).length;
}
}, {
key: "reset",

@@ -25,0 +31,0 @@ value: function reset() {

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "3.1.0-alpha.8",
"version": "3.1.0-alpha.9",
"keywords": [

@@ -36,3 +36,3 @@ "javascript",

},
"gitHead": "b9b1d242d5a9722157df9f3f4232bcc6d0da2709"
"gitHead": "fc5d2446ed49307e9caa4f4e774c18d1229f901d"
}
import getHiResTimestamp from '../utils/hi-res-timestamp';
export default class Stat {
constructor(name, samples) {
constructor(name, type) {
this.name = name;
this.type = type;
this.sampleSize = 1;

@@ -7,0 +8,0 @@ this.reset();

@@ -11,7 +11,11 @@ import Stat from './stat';

// Acquire a stat. Create if it doesn't exist.
get(name) {
this.stats[name] = this.stats[name] || new Stat(name);
get(name, type = 'count') {
this.stats[name] = this.stats[name] || new Stat(name, type);
return this.stats[name];
}
size() {
return Object.keys(this.stats).length;
}
// Reset all stats

@@ -18,0 +22,0 @@ reset() {

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

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