Socket
Socket
Sign inDemoInstall

analytics-node

Package Overview
Dependencies
Maintainers
2
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

analytics-node - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

5

History.md

@@ -0,1 +1,6 @@

1.0.3 - 2014-08-05
==================
* fix: context data being added to messages
1.0.2 - 2014-07-23

@@ -2,0 +7,0 @@ ==================

4

lib/index.js

@@ -134,7 +134,6 @@

var batch = items.map(function(_){ return _.message; });
var context = { library: { name: 'analytics-node', version: version }};
var data = {
batch: batch,
timestamp: new Date(),
context: context,
messageId: uid(8)

@@ -170,2 +169,3 @@ };

message.type = type;
message.context = { library: { name: 'analytics-node', version: version }};
if (!message.timestamp) message.timestamp = new Date();

@@ -172,0 +172,0 @@

{
"name": "analytics-node",
"repository": "git://github.com/segmentio/analytics-node",
"version": "1.0.2",
"version": "1.0.3",
"description": "The hassle-free way to integrate analytics into any node application.",

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

@@ -67,4 +67,5 @@

a.enqueue('type', { timestamp: date }, noop);
assert.deepEqual(a.queue[0], {
message: { type: 'type', timestamp: date },
message: { type: 'type', timestamp: date, context: context },
callback: noop

@@ -119,3 +120,2 @@ });

assert.deepEqual(data.batch, [1, 2]);
assert.deepEqual(data.context, context);
assert(data.timestamp instanceof Date);

@@ -144,3 +144,4 @@ assert(data.messageId && /[a-zA-Z0-9]{8}/.test(data.messageId));

userId: 'id',
timestamp: date
timestamp: date,
context: context
});

@@ -168,3 +169,4 @@ });

groupId: 'group',
timestamp: date
timestamp: date,
context: context
});

@@ -198,3 +200,4 @@ });

userId: 'id',
timestamp: date
timestamp: date,
context: context
});

@@ -210,3 +213,4 @@ });

type: 'track',
timestamp: date
timestamp: date,
context: context
})

@@ -239,3 +243,4 @@ });

userId: 'id',
timestamp: date
timestamp: date,
context: context
});

@@ -263,3 +268,4 @@ });

userId: 'id',
timestamp: date
timestamp: date,
context: context
});

@@ -316,2 +322,1 @@ });

}
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