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

hot-shots

Package Overview
Dependencies
Maintainers
1
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hot-shots - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

4

CHANGES.md

@@ -9,2 +9,6 @@ CHANGELOG

## 2.3.0 (2015-1-17)
* @bdeitte Fix increment(name, 0) to send a 0 count instead of 1
* @bdeitte Flush the queue when needed on close()
## 2.2.0 (2015-1-10)

@@ -11,0 +15,0 @@ * @bdeitte Document and expand on close API

@@ -91,3 +91,8 @@ var dgram = require('dgram'),

Client.prototype.increment = function (stat, value, sampleRate, tags, callback) {
this.sendAll(stat, value || 1, 'c', sampleRate, tags, callback);
// we explicitly check for undefined and null (and don't do a "! value" check)
// so that 0 values are allowed and sent through as-is
if (value === undefined || value === null) {
value = 1;
}
this.sendAll(stat, value, 'c', sampleRate, tags, callback);
};

@@ -380,2 +385,6 @@

if(this.buffer.length >= 0) {
this.flushQueue();
}
if (callback) {

@@ -382,0 +391,0 @@ // use the close event rather than adding a callback to close()

2

package.json
{
"name": "hot-shots",
"description": "Node.js client for StatsD, DogStatsD, and Telegraf",
"version": "2.2.0",
"version": "2.3.0",
"author": "Steve Ivy",

@@ -6,0 +6,0 @@ "contributors": [

@@ -63,2 +63,8 @@ # hot-shots

// Catch socket errors so they don't go unhandled, as explained
// in the Errors section below
client.socket.on('error', function(error) {
console.error("Error in socket: ", error);
});
// Timing: sends a timing command with the specified milliseconds

@@ -95,3 +101,4 @@ client.timing('response_time', 42);

// Using the callback
// Using the callback. This is the same format for the callback
// with all non-close calls
client.set(['foo', 'bar'], 42, function(error, bytes){

@@ -139,3 +146,3 @@ //this only gets called once after all messages have been sent

client.socket.on('error', function(error) {
return console.error("Error in socket: ", error);
console.error("Error in socket: ", error);
});

@@ -148,7 +155,10 @@ ```

1. Make sure you've added any new tests needed
2. Run "npm install && npm test"
3. Update the HEAD section in CHANGES.md with a description of what you have done
4. Push your changes and create the PR, and we'll try to get this merged in right away
1. Run "npm install"
2. Add your changes in your fork as well as any new tests needed
3. Run "npm test"
4. Update the HEAD section in CHANGES.md with a description of what you have done
5. Push your changes and create the PR
When you've done all this we're happy to try to get this merged in right away.
## Name

@@ -155,0 +165,0 @@

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