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.3 to 1.0.4

5

History.md

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

1.0.4 - 2014-08-14
==================
* fix: given contexts to extended and not wiped out
1.0.3 - 2014-08-05

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

3

lib/index.js

@@ -11,2 +11,3 @@

var version = require('../package.json').version;
var extend = require('lodash').extend;

@@ -169,3 +170,3 @@ global.setImmediate = global.setImmediate || process.nextTick.bind(process);

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

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

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

@@ -19,2 +19,3 @@ "keywords": [

"join-component": "~1.0.0",
"lodash": "~2.4.1",
"superagent": "~0.16.0",

@@ -21,0 +22,0 @@ "debug": "~1.0.4",

@@ -106,2 +106,13 @@

});
it('should extend the given context', function(){
a.enqueue('type', { event: 'test', context: { name: 'travis' } }, noop);
assert.deepEqual(a.queue[0].message.context, {
library: {
name:'analytics-node',
version: require('../package.json').version
},
name: 'travis'
});
});
});

@@ -108,0 +119,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