Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mixpanel

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mixpanel - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

5

lib/mixpanel-node.js

@@ -392,3 +392,6 @@ /*

if (!properties) { properties = {}; }
if (typeof(properties) === 'function' || !properties) {
callback = properties;
properties = {};
}

@@ -395,0 +398,0 @@ if (typeof(amount) !== 'number') {

2

package.json

@@ -10,3 +10,3 @@ {

],
"version": "0.1.0",
"version": "0.1.1",
"homepage": "https://github.com/mixpanel/mixpanel-node",

@@ -13,0 +13,0 @@ "author": "Carl Sverre",

@@ -117,2 +117,3 @@ Mixpanel-node

- [Tobias Baunbæk](https://github.com/freeall)
- [Eduardo Sorribas](https://github.com/sorribas)

@@ -119,0 +120,0 @@ License

@@ -287,2 +287,38 @@ var Mixpanel = require('../lib/mixpanel-node'),

test.done();
},
"supports being called with a callback": function(test) {
var expected_data = {
$append: { $transactions: { $amount: 50 } },
$token: this.token,
$distinct_id: this.distinct_id
};
var callback = function() {};
this.mixpanel.people.track_charge(this.distinct_id, 50, callback);
test.ok(
this.mixpanel.send_request.args[0][2] === callback,
"people.track_charge didn't call send_request with correct arguments"
);
test.done();
},
"supports being called with properties and a callback": function(test) {
var expected_data = {
$append: { $transactions: { $amount: 50 } },
$token: this.token,
$distinct_id: this.distinct_id
};
var callback = function() {};
this.mixpanel.people.track_charge(this.distinct_id, 50, {}, callback);
test.ok(
this.mixpanel.send_request.args[0][2] === callback,
"people.track_charge didn't call send_request with correct arguments"
);
test.done();
}

@@ -289,0 +325,0 @@ },

Sorry, the diff of this file is not supported yet

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