mixpanel-browser 2.43.0 → 2.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/mixpanel-jslib-snippet.min.js +3 -3
- package/dist/mixpanel-jslib-snippet.min.test.js +3 -3
- package/dist/mixpanel.amd.js +908 -2782
- package/dist/mixpanel.cjs.js +908 -2782
- package/dist/mixpanel.globals.js +908 -2782
- package/dist/mixpanel.min.js +100 -150
- package/dist/mixpanel.umd.js +908 -2782
- package/mixpanel-jslib-snippet.js +2 -2
- package/package.json +1 -1
- package/src/config.js +1 -1
- package/src/mixpanel-core.js +31 -106
- package/src/mixpanel-persistence.js +0 -21
- package/src/request-batcher.js +45 -8
- package/src/request-queue.js +55 -18
- package/src/utils.js +0 -48
- package/src/mixpanel-notification.js +0 -1309
- package/src/property-filters.js +0 -508
package/src/utils.js
CHANGED
|
@@ -150,14 +150,6 @@ _.bind = function(func, context) {
|
|
|
150
150
|
return bound;
|
|
151
151
|
};
|
|
152
152
|
|
|
153
|
-
_.bind_instance_methods = function(obj) {
|
|
154
|
-
for (var func in obj) {
|
|
155
|
-
if (typeof(obj[func]) === 'function') {
|
|
156
|
-
obj[func] = _.bind(obj[func], obj);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
};
|
|
160
|
-
|
|
161
153
|
/**
|
|
162
154
|
* @param {*=} obj
|
|
163
155
|
* @param {function(...*)=} iterator
|
|
@@ -186,19 +178,6 @@ _.each = function(obj, iterator, context) {
|
|
|
186
178
|
}
|
|
187
179
|
};
|
|
188
180
|
|
|
189
|
-
_.escapeHTML = function(s) {
|
|
190
|
-
var escaped = s;
|
|
191
|
-
if (escaped && _.isString(escaped)) {
|
|
192
|
-
escaped = escaped
|
|
193
|
-
.replace(/&/g, '&')
|
|
194
|
-
.replace(/</g, '<')
|
|
195
|
-
.replace(/>/g, '>')
|
|
196
|
-
.replace(/"/g, '"')
|
|
197
|
-
.replace(/'/g, ''');
|
|
198
|
-
}
|
|
199
|
-
return escaped;
|
|
200
|
-
};
|
|
201
|
-
|
|
202
181
|
_.extend = function(obj) {
|
|
203
182
|
_.each(slice.call(arguments, 1), function(source) {
|
|
204
183
|
for (var prop in source) {
|
|
@@ -374,33 +353,6 @@ _.formatDate = function(d) {
|
|
|
374
353
|
pad(d.getUTCSeconds());
|
|
375
354
|
};
|
|
376
355
|
|
|
377
|
-
_.safewrap = function(f) {
|
|
378
|
-
return function() {
|
|
379
|
-
try {
|
|
380
|
-
return f.apply(this, arguments);
|
|
381
|
-
} catch (e) {
|
|
382
|
-
console.critical('Implementation error. Please turn on debug and contact support@mixpanel.com.');
|
|
383
|
-
if (Config.DEBUG){
|
|
384
|
-
console.critical(e);
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
_.safewrap_class = function(klass, functions) {
|
|
391
|
-
for (var i = 0; i < functions.length; i++) {
|
|
392
|
-
klass.prototype[functions[i]] = _.safewrap(klass.prototype[functions[i]]);
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
_.safewrap_instance_methods = function(obj) {
|
|
397
|
-
for (var func in obj) {
|
|
398
|
-
if (typeof(obj[func]) === 'function') {
|
|
399
|
-
obj[func] = _.safewrap(obj[func]);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
};
|
|
403
|
-
|
|
404
356
|
_.strip_empty_properties = function(p) {
|
|
405
357
|
var ret = {};
|
|
406
358
|
_.each(p, function(v, k) {
|