Socket
Socket
Sign inDemoInstall

hot-shots

Package Overview
Dependencies
Maintainers
1
Versions
90
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 8.0.0 to 8.1.0

7

CHANGES.md
CHANGELOG
=========
## 8.1.0 (2020-9-25)
* @maleblond Support multiple values for the same tag key
## 8.0.0 (2020-9-23)
* @naseemkullah Change default value for 'host' from 'localhost' to
undefined. This should also 127.0.0.1 or ::1 to be used in the
default case, which does look to speed things up. This should be a
undefined. This means the default host will now be 127.0.0.1 or ::1,
which has cases where it will speed up sending metrics. This should be a
non-breaking change, but bumping to a major version for it given

@@ -9,0 +12,0 @@ it's a very base change to the library.

@@ -38,20 +38,23 @@ const fs = require('fs');

} else {
childCopy[tag.substring(0, idx)] = tag.substring(idx + 1);
const key = tag.substring(0, idx);
const value = tag.substring(idx + 1);
childCopy[key] = childCopy[key] || [];
childCopy[key].push(value);
}
});
const result = parent.map(tag => {
const result = parent.filter(tag => {
const idx = typeof tag === 'string' ? tag.indexOf(':') : -1;
if (idx < 1) { // Not found or first character
return tag;
return true;
}
const key = tag.substring(0, idx);
if (childCopy.hasOwnProperty(key)) {
const value = childCopy[key];
delete childCopy[key];
return `${key}:${value}`;
}
return tag;
return !childCopy.hasOwnProperty(key);
});
Object.keys(childCopy).forEach(key => {
result.push(`${key}:${childCopy[key]}`);
for (const value of childCopy[key]) {
result.push(`${key}:${value}`);
}
});

@@ -58,0 +61,0 @@ return result.concat(toAppend);

{
"name": "hot-shots",
"description": "Node.js client for StatsD, DogStatsD, and Telegraf",
"version": "8.0.0",
"version": "8.1.0",
"author": "Steve Ivy",

@@ -6,0 +6,0 @@ "types": "./types.d.ts",

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