posthog-js 1.36.0 → 1.36.1
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/array.js +1 -1
- package/dist/array.js.map +1 -1
- package/dist/es.js +38 -22
- package/dist/es.js.map +1 -1
- package/dist/module.d.ts +4 -0
- package/dist/module.js +38 -22
- package/dist/module.js.map +1 -1
- package/lib/package.json +2 -2
- package/package.json +2 -2
package/dist/es.js
CHANGED
|
@@ -917,7 +917,7 @@ var LZString = {
|
|
|
917
917
|
}
|
|
918
918
|
};
|
|
919
919
|
|
|
920
|
-
var version = "1.36.
|
|
920
|
+
var version = "1.36.1";
|
|
921
921
|
|
|
922
922
|
// e.g. Config.DEBUG = Config.DEBUG || instance.get_config('debug')
|
|
923
923
|
|
|
@@ -1199,7 +1199,6 @@ var _strip_empty_properties = function _strip_empty_properties(p) {
|
|
|
1199
1199
|
|
|
1200
1200
|
return ret;
|
|
1201
1201
|
};
|
|
1202
|
-
var COPY_IN_PROGRESS_ATTRIBUTE = typeof Symbol !== 'undefined' ? Symbol('__deepCircularCopyInProgress__') : '__deepCircularCopyInProgress__';
|
|
1203
1202
|
/**
|
|
1204
1203
|
* Deep copies an object.
|
|
1205
1204
|
* It handles cycles by replacing all references to them with `undefined`
|
|
@@ -1207,35 +1206,39 @@ var COPY_IN_PROGRESS_ATTRIBUTE = typeof Symbol !== 'undefined' ? Symbol('__deepC
|
|
|
1207
1206
|
*
|
|
1208
1207
|
* @param value
|
|
1209
1208
|
* @param customizer
|
|
1210
|
-
* @param [key] if provided this is the object key associated with the value to be copied. It allows the customizer function to have context when it runs
|
|
1211
1209
|
* @returns {{}|undefined|*}
|
|
1212
1210
|
*/
|
|
1213
1211
|
|
|
1214
|
-
function deepCircularCopy(value, customizer
|
|
1215
|
-
|
|
1212
|
+
function deepCircularCopy(value, customizer) {
|
|
1213
|
+
var COPY_IN_PROGRESS_SET = new Set();
|
|
1216
1214
|
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
var result;
|
|
1215
|
+
function internalDeepCircularCopy(value, key) {
|
|
1216
|
+
if (value !== Object(value)) return customizer ? customizer(value, key) : value; // primitive value
|
|
1220
1217
|
|
|
1221
|
-
|
|
1222
|
-
|
|
1218
|
+
if (COPY_IN_PROGRESS_SET.has(value)) return undefined;
|
|
1219
|
+
COPY_IN_PROGRESS_SET.add(value);
|
|
1220
|
+
var result;
|
|
1223
1221
|
|
|
1224
|
-
|
|
1225
|
-
result
|
|
1226
|
-
});
|
|
1227
|
-
} else {
|
|
1228
|
-
result = {};
|
|
1222
|
+
if (_isArray(value)) {
|
|
1223
|
+
result = [];
|
|
1229
1224
|
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1225
|
+
_eachArray(value, function (it) {
|
|
1226
|
+
result.push(internalDeepCircularCopy(it));
|
|
1227
|
+
});
|
|
1228
|
+
} else {
|
|
1229
|
+
result = {};
|
|
1230
|
+
|
|
1231
|
+
_each(value, function (val, key) {
|
|
1232
|
+
if (!COPY_IN_PROGRESS_SET.has(val)) {
|
|
1233
|
+
result[key] = internalDeepCircularCopy(val, key);
|
|
1234
|
+
}
|
|
1235
|
+
});
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
return result;
|
|
1235
1239
|
}
|
|
1236
1240
|
|
|
1237
|
-
|
|
1238
|
-
return result;
|
|
1241
|
+
return internalDeepCircularCopy(value);
|
|
1239
1242
|
}
|
|
1240
1243
|
|
|
1241
1244
|
var LONG_STRINGS_ALLOW_LIST = ['$performance_raw'];
|
|
@@ -7155,6 +7158,19 @@ var PostHog = /*#__PURE__*/function () {
|
|
|
7155
7158
|
this.reloadFeatureFlags();
|
|
7156
7159
|
}
|
|
7157
7160
|
}
|
|
7161
|
+
/**
|
|
7162
|
+
* Resets only the group properties of the user currently logged in.
|
|
7163
|
+
*/
|
|
7164
|
+
|
|
7165
|
+
}, {
|
|
7166
|
+
key: "resetGroups",
|
|
7167
|
+
value: function resetGroups() {
|
|
7168
|
+
this.register({
|
|
7169
|
+
$groups: {}
|
|
7170
|
+
}); // If groups changed, reload feature flags.
|
|
7171
|
+
|
|
7172
|
+
this.reloadFeatureFlags();
|
|
7173
|
+
}
|
|
7158
7174
|
/**
|
|
7159
7175
|
* Clears super properties and generates a new random distinct_id for this instance.
|
|
7160
7176
|
* Useful for clearing data when a user logs out.
|