New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

notification-processor

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

notification-processor - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

lib/ignore.user.filter.js

7

lib/observers/logger.observer.js

@@ -23,3 +23,3 @@ (function() {

});
return observable.on("finished", function(arg) {
observable.on("finished", function(arg) {
var log;

@@ -29,2 +29,7 @@ log = arg.context.log;

});
return observable.on("ignored", function(arg) {
var log, message, ref;
(ref = arg.context, log = ref.log), message = arg.message;
return log("Message ignored", message);
});
}

@@ -31,0 +36,0 @@ };

8

lib/processor.builder.js
(function() {
var Processor, ProcessorBuilder, ServiceBusAdapter, _, logger,
var IgnoreUsers, Processor, ProcessorBuilder, ServiceBusAdapter, _, logger,
slice = [].slice;

@@ -13,2 +13,4 @@

IgnoreUsers = require("./ignore.user.filter");
module.exports = ProcessorBuilder = (function() {

@@ -18,2 +20,3 @@ function ProcessorBuilder() {

this.adapter = _.identity;
this.filters = [];
}

@@ -47,2 +50,3 @@

ProcessorBuilder.prototype.ignoreUsers = function() {
this.filters = _.concat(this.filters, IgnoreUsers);
return this;

@@ -53,3 +57,3 @@ };

var processor;
processor = new Processor(this.adapter, this.command);
processor = new Processor(this.filters, this.adapter, this.command);
_.forEach(this.listeners, function(listener) {

@@ -56,0 +60,0 @@ return listener.listenTo(processor);

@@ -16,3 +16,4 @@ (function() {

function Processor(adapter, runner) {
function Processor(filters, adapter, runner) {
this.filters = filters;
this.adapter = adapter;

@@ -34,2 +35,14 @@ this.runner = runner;

});
if (this.shouldBeIgnore({
meta: meta,
message: message
})) {
this.emit("ignored", {
context: context,
message: message,
meta: meta
});
context.done();
return;
}
Promise.method(this.runner)({

@@ -66,2 +79,13 @@ message: message,

Processor.prototype.shouldBeIgnore = function(arg) {
var message, meta;
meta = arg.meta, message = arg.message;
return _.some(this.filters, function(filter) {
return filter({
meta: meta,
message: message
});
});
};
return Processor;

@@ -68,0 +92,0 @@

{
"name": "notification-processor",
"version": "0.1.1",
"version": "0.1.2",
"description": "notification-processor",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc