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

metrics

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metrics - npm Package Compare versions

Comparing version 0.1.20 to 0.1.21

percentiles.js

7

lib/binary_heap.js

@@ -14,7 +14,4 @@ // From http://eloquentjavascript.net/appendix2.html,

clone: function() {
var heap = new BinaryHeap(this.scoreFunction);
// A little hacky, but effective.
heap.content = JSON.parse(JSON.stringify(this.content));
return heap;
getValues: function() {
return this.content;
},

@@ -21,0 +18,0 @@

{
"name": "metrics",
"description": "A node.js port of Coda Hale's metrics library. In use at Yammer.",
"version": "0.1.20",
"version": "0.1.21",
"types": "index.d.ts",

@@ -6,0 +6,0 @@ "repository": {

@@ -17,11 +17,5 @@ var Sample = require('./sample')

// This is a relatively expensive operation
// The result is not sorted in a meaningful order.
ExponentiallyDecayingSample.prototype.getValues = function() {
var values = []
, elt
, heap = this.values.clone();
while(elt = heap.pop()) {
values.push(elt.val);
}
return values;
return this.values.getValues().map(function(v) { return v.val; });
}

@@ -28,0 +22,0 @@

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