ml-array-variance
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -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; |
{ | ||
"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; |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5396
76
0
2
+ Addedis-any-array@^0.0.3
+ Addedis-any-array@0.0.3(transitive)
Updatedml-array-mean@^1.1.0