Socket
Socket
Sign inDemoInstall

@hestia-earth/utils

Package Overview
Dependencies
1
Maintainers
1
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.10.23 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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc