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

calc-stats

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

calc-stats - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

calc-stats.js

@@ -80,3 +80,3 @@ const fasterMedian = require("faster-median");

let needCount = calcMean || calcMedian;
let needHistogram = calcMode || calcModes || calcHistogram;
let needHistogram = calcHistogram || calcMedian || calcMode || calcModes;
let needSum = calcSum || calcMean;

@@ -83,0 +83,0 @@

{
"name": "calc-stats",
"version": "0.0.3",
"version": "0.0.4",
"description": "Memory-Aware Statistical Calculations",

@@ -5,0 +5,0 @@ "main": "calc-stats.js",

@@ -21,3 +21,3 @@ # calc-stats

# usage
# basic usage
```javascript

@@ -50,2 +50,22 @@ import calcStats from "calc-stats";

*/
```
```
# advanced usage
If you only care about specific statistics, you can configure calcStats through an options object:
```js
import calcStats from "calc-stats";
// we only want the min and max
const options = {
calcHistogram: false,
calcMax: true,
calcMean: false,
calcMedian: false,
calcMin: true,
calcMode: false,
calcModes: false,
calcSum: false
};
const results = calcStats(data, options);
// results is { min: 1, max: 100 }
```
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