Socket
Socket
Sign inDemoInstall

nstats

Package Overview
Dependencies
2
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0 to 4.1.0

17

nstats.js

@@ -5,3 +5,3 @@ const fp = require('fastify-plugin')

{
constructor(ws, httpServer)
constructor(ws, httpServer, server_version)
{

@@ -14,2 +14,3 @@ this.clients = ws.clients || null;

this.data = {
server_version,
uptime: 0,

@@ -436,10 +437,18 @@ totalMemory: 0,

var nstats;
const fs = require('fs');
module.exports = function(ws, httpServer)
module.exports = function(ws, httpServer, server_version)
{
if(!nstats)
{
if(!server_version) {
try {
server_version = require(process.cwd()+'/package.json').version;
} catch (e) {
server_version = '0.0.0'
}
}
nstats = new NStats(ws ||
{}, httpServer || null);
{}, httpServer || null, server_version);
}

@@ -446,0 +455,0 @@

{
"name": "nstats",
"version": "4.0.0",
"version": "4.1.0",
"description": "A fast and compact way to get all your network and process stats for your node application.",

@@ -5,0 +5,0 @@ "main": "nstats.js",

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc