Skip to content

Commit fba4915

Browse files
committed
add function to check if context has specified context
1 parent f39acbd commit fba4915

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/core/plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ Plugin.prototype.isContextValid = function() {
4949
});
5050
};
5151

52+
Plugin.prototype.hasContext = function(context) {
53+
return this.currentContext.includes(context);
54+
};
55+
5256
Plugin.prototype.loadPlugin = function() {
5357
if (!this.isContextValid()) {
5458
console.log(this.acceptedContext);

0 commit comments

Comments
 (0)