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

ml-array-variance

Package Overview
Dependencies
Maintainers
5
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-array-variance - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

src/__tests__/variance.test.js

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [1.1.0](https://github.com/mljs/array/compare/ml-array-variance@1.0.1...ml-array-variance@1.1.0) (2018-10-26)
**Note:** Version bump only for package ml-array-variance
<a name="1.0.1"></a>

@@ -8,0 +16,0 @@ ## [1.0.1](https://github.com/mljs/array/compare/ml-array-variance@1.0.0...ml-array-variance@1.0.1) (2018-08-03)

@@ -6,2 +6,3 @@ 'use strict';

var arrayMean = _interopDefault(require('ml-array-mean'));
var isArray = _interopDefault(require('is-any-array'));

@@ -17,2 +18,6 @@ /**

function variance(values, options = {}) {
if (!isArray(values)) {
throw new TypeError('input must be an array');
}
const { unbiased = true, mean = arrayMean(values) } = options;

@@ -19,0 +24,0 @@ var sqrError = 0;

8

package.json
{
"name": "ml-array-variance",
"version": "1.0.1",
"version": "1.1.0",
"description": "Get the variance in an array",

@@ -23,4 +23,6 @@ "main": "lib/index.js",

"dependencies": {
"ml-array-mean": "^1.0.2"
}
"is-any-array": "^0.0.3",
"ml-array-mean": "^1.1.0"
},
"gitHead": "812f53d78df7770c287916b88e94de51815f574b"
}
import arrayMean from 'ml-array-mean';
import isArray from 'is-any-array';

@@ -12,2 +13,6 @@ /**

export default function variance(values, options = {}) {
if (!isArray(values)) {
throw new TypeError('input must be an array');
}
const { unbiased = true, mean = arrayMean(values) } = options;

@@ -14,0 +19,0 @@ var sqrError = 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