mixpanel-data-export
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -1,8 +0,8 @@ | ||
var CryptoJS = require("cryptojs").Crypto; | ||
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
if (typeof window !== "object" && typeof require === "function") { | ||
var CryptoJS = require("cryptojs").Crypto; | ||
var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
} | ||
var MixpanelExport; | ||
var MixpanelExport = (function() { | ||
MixpanelExport = (function() { | ||
function MixpanelExport(opts) { | ||
@@ -17,2 +17,3 @@ this.opts = opts; | ||
this.timeout_after = this.opts.timeout_after || 10; | ||
this._requestNumber = 0; | ||
} | ||
@@ -79,4 +80,5 @@ | ||
if (typeof window === 'object') { | ||
var requestUrl = this._buildRequestURL(method, parameters) + "&callback=mpSuccess"; | ||
window.mpSuccess = callback; | ||
var requestNumber = this._getNewRequestNumber(); | ||
var requestUrl = this._buildRequestURL(method, parameters) + "&callback=mpSuccess" + requestNumber; | ||
window['mpSuccess' + requestNumber] = callback; | ||
var script = document.createElement("script"); | ||
@@ -186,2 +188,6 @@ script.src = requestUrl; | ||
MixpanelExport.prototype._getNewRequestNumber = function() { | ||
return this._requestNumber++; | ||
}; | ||
return MixpanelExport; | ||
@@ -191,2 +197,4 @@ | ||
module.exports = MixpanelExport; | ||
if (typeof window !== "object" && typeof require === "function") { | ||
module.exports = MixpanelExport; | ||
} |
{ | ||
"name": "mixpanel-data-export", | ||
"version": "v1.2.0", | ||
"version": "v1.2.1", | ||
"description": "A wrapper for Mixpanel's data export API. Simply instantiate the class with your API secret and key and then make calls to api methods and get json back.", | ||
@@ -38,4 +38,6 @@ "keywords": [ | ||
"grunt-cli": "~0.1.13", | ||
"mocha": "~1.17.1" | ||
"mocha": "~1.17.1", | ||
"grunt-contrib-copy": "~0.5.0", | ||
"grunt-contrib-uglify": "~0.4.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
Mixpanel Data Export (v 1.2.0) | ||
Mixpanel Data Export (v 1.2.1) | ||
============================== | ||
@@ -3,0 +3,0 @@ |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
9931
162
5