1.0.1 • Published 8 years ago

app-registry v1.0.1

Weekly downloads
556
License
ISC
Repository
-
Last release
8 years ago

App Registry

A registry tool to set and share application services.

var registry = require('app-registry');
function serviceOne() {
  console.log('This is the service one');
}

registry.register('firstService', serviceOne);


// Somewere in the app (in another file)
var theServiceINeed = registry.get('firstService');
theServiceINeed();

API

####getRegistered() Return the list of registered services.

####register(serviceName, service) Register a new service.

####get(serviceName) Get the service with name serviceName. Throw an exception if the service doesn't exists.

####exists(serviceName) Check if the the service with name serviceName exists

####unset(serviceName) Unset if the the service with name serviceName from the registry.

####reset() Remove all services from registry. Useful in the test environment.

1.0.1

8 years ago

1.0.0

8 years ago