Socket
Socket
Sign inDemoInstall

iceflow-server

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

iceflow-server - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

middleware/response.js

23

lib/Events.js
const EventEmitter = require('events');
module.exports = new EventEmitter();
const Emitter = new EventEmitter();
const utils = require('../utils/utils')
Emitter._on = Emitter.on;
// @method on
// @description a wrapper for the on method of the EventEmitter instance
// this is important because if multiple components register events on the server
// this can add up to thousands of listeners ultimately causing memory leaks
// the iso param is a requirement for server events (which generally never need to be bound)
// @params
// -evt [String] the event to listen for
// -callback [Function] the callback to call
// -iso [Boolean] If true will bind it on the server as well as client
Emitter.on = function(evt, callback, iso){
if(!iso && iso !== false && !utils.env.isServer() || iso){
Emitter._on(evt, callback);
}
}
module.exports = Emitter;

2

package.json

@@ -66,3 +66,3 @@ {

},
"version": "0.1.8"
"version": "0.1.9"
}

@@ -266,3 +266,3 @@ #Iceflow Server

The Events module is the central event aggregator for your app. It's just an alias for node/events. There are a few built in events used for routing. These events are intended for the client only.
The Events module is the central event aggregator for your app. It's just an alias for node/events. The "on" method of Events is a wrapper for the native method, this method by default will not add events on the server to prevent memory leaks. If you need to add events on the server set a third argument as true for "on". There are a few built in events used for routing. These events are intended for the client only.

@@ -269,0 +269,0 @@ route - This will trigger the router to route to the passed in url

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