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

@squared-functions/module

Package Overview
Dependencies
Maintainers
1
Versions
355
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squared-functions/module - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7

11

index.js

@@ -1,2 +0,2 @@

/* @squared-functions/module 1.2.6
/* @squared-functions/module 1.2.7
https://github.com/anpham6/squared-functions */

@@ -31,6 +31,6 @@

const ASYNC_FUNCTION = Object.getPrototypeOf(async () => { }).constructor;
const [CPU_CORETIME, MEM_TOTAL] = (function () {
const [CPU_CORETIME, CPU_CORETOTAL, MEM_TOTAL] = (function () {
const lib = require('os');
const cpus = lib.cpus();
return [cpus.reduce((a, b) => a + b.times.user + b.times.sys, 0) / cpus.length, lib.totalmem()];
return [cpus.reduce((a, b) => a + b.times.user + b.times.sys, 0), cpus.length, lib.totalmem()];
})();

@@ -797,3 +797,3 @@ const [VER_MAJOR, VER_MINOR, VER_PATCH] = process.version.substring(1).split('.').map(value => +value);

const { user, system } = process.cpuUsage(previous);
const result = (user + system) / CPU_CORETIME;
const result = (user + system) / (CPU_CORETIME * CPU_CORETOTAL);
return format ? formatPercent(result) : result;

@@ -809,4 +809,3 @@ }

}
result /= MEM_TOTAL;
return format ? formatPercent(result) : result;
return format ? formatPercent(result / MEM_TOTAL) : result;
}

@@ -813,0 +812,0 @@ static cleanupStream(writable, uri) {

{
"name": "@squared-functions/module",
"version": "1.2.6",
"version": "1.2.7",
"description": "Module extension class for squared-functions",

@@ -18,3 +18,3 @@ "main": "index.js",

"dependencies": {
"@squared-functions/types": "1.2.6",
"@squared-functions/types": "1.2.7",
"uuid": "^8.3.2",

@@ -21,0 +21,0 @@ "chalk": "^4.1.2"

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