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

lynx

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lynx - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

24

lib/lynx.js

@@ -110,2 +110,3 @@ var dgram = require('dgram')

, start_time = new Date ().getTime()
, stopped = false
;

@@ -120,4 +121,27 @@

function stop() {
//
// If timer is already stopped just ignore the request
//
if(stopped) {
self.on_error(
{ message : "Can't stop a timer twice"
, f : 'stop'
});
return;
}
//
// Calculate duration
//
var duration = new Date ().getTime() - start_time;
//
// Emit
//
self.timing(stat, duration, sample_rate);
//
// So no one stops a timer twice (causing two emits)
//
stopped = true;
}

@@ -124,0 +148,0 @@

2

package.json
{ "name" : "lynx"
, "description" : "Minimalistic StatsD client for Node.js programs"
, "version" : "0.0.6"
, "version" : "0.0.7"
, "author" : "Lloyd Hilaiel"

@@ -5,0 +5,0 @@ , "contributors": [ "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)" ]

@@ -27,2 +27,12 @@ var macros = require('./macros');

timer.stop();
//
// Atempt to stop already stopped timer
// Will console.log `Can't stop a timer twice`
//
// We are not testing for this, cause its just an error message
// but this would be raised on scenarios where a more strict error handler
// is enforced by the user
//
second_timer.stop();
}, 200);

@@ -29,0 +39,0 @@

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