@amplitude/analytics-core
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -34,7 +34,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
Timeline.prototype.deregister = function (pluginName) { | ||
this.plugins.splice(this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; }), 1); | ||
return Promise.resolve(); | ||
var _a; | ||
return tslib_1.__awaiter(this, void 0, void 0, function () { | ||
var index, plugin; | ||
return tslib_1.__generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
index = this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; }); | ||
plugin = this.plugins[index]; | ||
this.plugins.splice(index, 1); | ||
return [4 /*yield*/, ((_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin))]; | ||
case 1: | ||
_b.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
Timeline.prototype.reset = function (client) { | ||
this.applying = false; | ||
var plugins = this.plugins; | ||
plugins.map(function (plugin) { var _a; return (_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin); }); | ||
this.plugins = []; | ||
@@ -41,0 +57,0 @@ this.client = client; |
@@ -32,7 +32,23 @@ import { __assign, __awaiter, __generator, __read, __values } from "tslib"; | ||
Timeline.prototype.deregister = function (pluginName) { | ||
this.plugins.splice(this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; }), 1); | ||
return Promise.resolve(); | ||
var _a; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var index, plugin; | ||
return __generator(this, function (_b) { | ||
switch (_b.label) { | ||
case 0: | ||
index = this.plugins.findIndex(function (plugin) { return plugin.name === pluginName; }); | ||
plugin = this.plugins[index]; | ||
this.plugins.splice(index, 1); | ||
return [4 /*yield*/, ((_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin))]; | ||
case 1: | ||
_b.sent(); | ||
return [2 /*return*/]; | ||
} | ||
}); | ||
}); | ||
}; | ||
Timeline.prototype.reset = function (client) { | ||
this.applying = false; | ||
var plugins = this.plugins; | ||
plugins.map(function (plugin) { var _a; return (_a = plugin.teardown) === null || _a === void 0 ? void 0 : _a.call(plugin); }); | ||
this.plugins = []; | ||
@@ -39,0 +55,0 @@ this.client = client; |
{ | ||
"name": "@amplitude/analytics-core", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "", | ||
@@ -38,3 +38,3 @@ "author": "Amplitude Inc", | ||
"dependencies": { | ||
"@amplitude/analytics-types": "^2.1.0", | ||
"@amplitude/analytics-types": "^2.1.1", | ||
"tslib": "^2.4.1" | ||
@@ -45,3 +45,3 @@ }, | ||
], | ||
"gitHead": "8f4ea010279fb21190a2c0595d4ae8a7d9e987ce" | ||
"gitHead": "4d88679924fb78f7ed4e49611a79109e2d2f805c" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
364089
3562