@aws-amplify/core
Advanced tools
Comparing version 1.0.21 to 1.0.22-unstable.0
@@ -6,2 +6,10 @@ # Change Log | ||
<a name="1.0.22-unstable.0"></a> | ||
## [1.0.22-unstable.0](https://github.com/aws/aws-amplify/compare/@aws-amplify/core@1.0.21...@aws-amplify/core@1.0.22-unstable.0) (2018-12-26) | ||
**Note:** Version bump only for package @aws-amplify/core | ||
<a name="1.0.21"></a> | ||
@@ -8,0 +16,0 @@ ## [1.0.21](https://github.com/aws/aws-amplify/compare/@aws-amplify/core@1.0.21-unstable.0...@aws-amplify/core@1.0.21) (2018-12-26) |
@@ -9,2 +9,3 @@ export declare class HubClass { | ||
listen(channel: any, listener: any, listenerName?: string): void; | ||
remove(channel: any, listener: any, listenerName?: string): void; | ||
toListeners(capsule: any): void; | ||
@@ -11,0 +12,0 @@ } |
@@ -54,2 +54,13 @@ "use strict"; | ||
}; | ||
HubClass.prototype.remove = function (channel, listener, listenerName) { | ||
if (listenerName === void 0) { listenerName = 'noname'; } | ||
logger.debug(listenerName + ' removing listener ' + channel); | ||
var holder = this.listeners[channel]; | ||
if (holder) { | ||
holder = holder.filter(function (_listener) { | ||
return !(listener === _listener.listener && listenerName === _listener.name); | ||
}); | ||
this.listeners[channel] = holder; | ||
} | ||
}; | ||
HubClass.prototype.toListeners = function (capsule) { | ||
@@ -56,0 +67,0 @@ var channel = capsule.channel, payload = capsule.payload, source = capsule.source; |
{ | ||
"name": "@aws-amplify/core", | ||
"version": "1.0.21", | ||
"version": "1.0.22-unstable.0", | ||
"description": "Core category of aws-amplify", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3980002
30762
1