Socket
Socket
Sign inDemoInstall

edifice-facade

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

edifice-facade

Create facades to separate modules in your application


Version published
Weekly downloads
7
Maintainers
1
Weekly downloads
 
Created
Source

edifice-facade

Create facades to separate modules in your application

Facades rely on a core which can be as simple as an EventEmitter. They separate modules from each other, so that the modules communicate with each other using events.

var EventEmitter = require("events").EventEmitter,
    Facade = require("edifice-facade");

var core = new EventEmitter();

var fileInterfaceFacade = new Facade(core,
    ['fileDataRead', 'fileWritten'], // permitted actions
    ['newInputData'] // permitted listeners
);
var userInterfaceFacade = new Facade(core,
    ['newInputData'],
    ['fileDataRead', 'fileWritten']
);

Now pass these facades to your fileInterface and userInterface, so they don't need to have each other or the core itself in scope.

Keywords

FAQs

Package last updated on 28 Apr 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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