analytics-node
Advanced tools
Comparing version 1.0.0 to 1.0.1
var assert = require('assert'); | ||
var clone = require('clone'); | ||
var debug = require('debug')('analytics-node'); | ||
@@ -166,2 +167,3 @@ var noop = function(){}; | ||
fn = fn || noop; | ||
message = clone(message); | ||
message.type = type; | ||
@@ -168,0 +170,0 @@ if (!message.timestamp) message.timestamp = new Date(); |
{ | ||
"name": "analytics-node", | ||
"repository": "git://github.com/segmentio/analytics-node", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "The hassle-free way to integrate analytics into any node application.", | ||
@@ -16,2 +16,3 @@ "keywords": [ | ||
"dependencies": { | ||
"clone": "~0.1.17", | ||
"component-type": "~1.0.0", | ||
@@ -18,0 +19,0 @@ "join-component": "~1.0.0", |
@@ -73,2 +73,8 @@ | ||
it('should not modify the original message', function(){ | ||
var message = { event: 'test' }; | ||
a.enqueue('type', message, noop); | ||
assert(!message.hasOwnProperty('timestamp')); | ||
}); | ||
it('should flush the queue if it hits the max length', function(done){ | ||
@@ -75,0 +81,0 @@ a.flushAt = 1; |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
17331
500
0
6
+ Addedclone@~0.1.17
+ Addedclone@0.1.19(transitive)