You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@hestia-earth/utils

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hestia-earth/utils - npm Package Compare versions

Comparing version

to
0.10.24

15

dist/term.js

@@ -7,12 +7,15 @@ "use strict";

var arrayValue = function (values, isAverage) {
if (values === void 0) { values = []; }
if (isAverage === void 0) { isAverage = false; }
return (values || []).reduce(function (prev, curr) { return prev + (utils_1.isEmpty(curr) ? 0 : parseFloat("" + curr)); }, 0) / (isAverage ? values.filter(function (v) { return !utils_1.isEmpty(v); }).length : 1);
return values.every(utils_1.isEmpty)
? null
: values.filter(function (v) { return typeof v !== 'undefined'; }).reduce(function (prev, curr) { return prev + (utils_1.isEmpty(curr) ? 0 : parseFloat("" + curr)); }, 0) / (isAverage ? values.filter(function (v) { return !utils_1.isEmpty(v); }).length : 1);
};
exports.arrayValue = arrayValue;
var propertyValue = function (value, termId) {
return typeof value === 'undefined' || value === null ?
null :
(Array.isArray(value) ?
exports.arrayValue(value, (termId ? glossary_1.getArrayTreatment(termId) : null) === 'mean') :
parseFloat("" + value));
return typeof value === 'undefined' || value === null
? null
: Array.isArray(value)
? exports.arrayValue(value, (termId ? glossary_1.getArrayTreatment(termId) : null) === 'mean')
: parseFloat("" + value);
};

@@ -19,0 +22,0 @@ exports.propertyValue = propertyValue;

2

package.json
{
"name": "@hestia-earth/utils",
"version": "0.10.23",
"version": "0.10.24",
"description": "Hestia Utils library",

@@ -5,0 +5,0 @@ "main": "dist/index.js",