Comparing version 0.1.20 to 0.1.21
@@ -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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83707
51
1994