@flowio/events
Advanced tools
Comparing version 0.0.3 to 0.0.4-0
@@ -17,2 +17,6 @@ 'use strict'; | ||
var _filter = require('lodash/filter'); | ||
var _filter2 = _interopRequireDefault(_filter); | ||
var _channelEventEmitter = require('./channel-event-emitter'); | ||
@@ -99,6 +103,22 @@ | ||
} | ||
/** | ||
* Reset previously triggered events. If not eventsToReset are provided, all events previously | ||
* triggered will be forgotten. | ||
* | ||
* @param {String[]} eventsToReset - Events to be reset | ||
*/ | ||
}, { | ||
key: 'resetPreviouslyTriggered', | ||
value: function resetPreviouslyTriggered() { | ||
this.previouslyTriggered = []; | ||
var eventsToReset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
if (eventsToReset.length) { | ||
this.previouslyTriggered = (0, _filter2.default)(this.previouslyTriggered, function (previous) { | ||
return !(0, _includes2.default)(eventsToReset, previous.event); | ||
}); | ||
} else { | ||
this.previouslyTriggered = []; | ||
} | ||
} | ||
@@ -105,0 +125,0 @@ }]); |
{ | ||
"name": "@flowio/events", | ||
"version": "0.0.3", | ||
"version": "0.0.4-0", | ||
"description": "Event Bus (Pub/Sub)", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
15459
182
0