Comparing version 0.0.13 to 0.0.14
@@ -56,4 +56,3 @@ /* | ||
port: 80, | ||
headers: {}, | ||
scheme: 'http' | ||
headers: {} | ||
}; | ||
@@ -188,2 +187,7 @@ | ||
if($set['ip']) { | ||
data['$ip'] = $set['ip']; | ||
delete $set['ip']; | ||
} | ||
if(metrics.config.debug) { | ||
@@ -190,0 +194,0 @@ console.log("Sending the following data to Mixpanel (Engage):"); |
@@ -5,3 +5,3 @@ { | ||
"keywords": ["mixpanel", "analytics", "api", "stats"], | ||
"version": "0.0.13", | ||
"version": "0.0.14", | ||
"homepage": "https://github.com/carlsverre/mixpanel-node", | ||
@@ -8,0 +8,0 @@ "author": "Carl Sverre", |
@@ -98,3 +98,3 @@ Mixpanel-node | ||
- [Thomas Watson Steen](https://github.com/watson) | ||
- [Randal Truong](https://github.com/ishbu) | ||
- [Gabor Ratky](https://github.com/rgabo) | ||
@@ -101,0 +101,0 @@ License |
@@ -57,2 +57,21 @@ var Mixpanel = require('../lib/mixpanel-node'), | ||
test.done(); | ||
}, | ||
"handles the ip property in a property object properly": function(test) { | ||
var prop = { ip: '1.2.3.4', key1: 'val1', key2: 'val2' }, | ||
expected_data = { | ||
$set: { key1: 'val1', key2: 'val2' }, | ||
$token: this.token, | ||
$distinct_id: this.distinct_id, | ||
$ip: '1.2.3.4' | ||
}; | ||
this.mixpanel.people.set(this.distinct_id, prop); | ||
test.ok( | ||
this.mixpanel.send_request.calledWithMatch(this.endpoint, expected_data), | ||
"people.set didn't call send_request with correct arguments" | ||
); | ||
test.done(); | ||
} | ||
@@ -59,0 +78,0 @@ }, |
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
35500
741
0