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

stream-log-stats

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stream-log-stats - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

10

lib/stats.js
"use strict";
var o = require("object-ting"),
path = require("path");
path = require("path"),
byteSize = require("byte-size");

@@ -8,3 +9,4 @@ var stats = module.exports = {

clientCount: 0,
transferred: 0,
bytes: 0,
transferred: "0",
requests: 0,

@@ -61,1 +63,5 @@ resource: {},

};
stats.addBytes = function(bytes){
this.bytes += bytes;
this.transferred = byteSize(this.bytes, 2);
};

2

lib/stream-log-stats.js

@@ -23,3 +23,3 @@ "use strict";

var logObject = JSON.parse(json);
stats.transferred += logObject.bytes;
stats.addBytes(logObject.bytes);
stats.requests++;

@@ -26,0 +26,0 @@ stats.addClient(logObject.remoteHost);

@@ -15,3 +15,3 @@ "use strict";

if (visible) {
dope.cursorLinesUp(13);
dope.cursorLinesUp(12);
} else {

@@ -18,0 +18,0 @@ visible = true;

{
"name": "stream-log-stats",
"author": "Lloyd Brookes <75pound@gmail.com>",
"version": "0.0.0",
"version": "0.0.1",
"description": "",

@@ -6,0 +6,0 @@ "repository": "https://github.com/75lb/stream-log-stats.git",

Sorry, the diff of this file is not supported yet

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