is-registered
v0.1.5 app base baseplugin plugin registered
is-registered
Util for Base that optionally prevents a plugin from being registered more than once on an instance
Install
Install with npm:
$ npm install is-registered --save
Usage
- Returns
true
ifapp
is a base instance and the named plugin is already registered on the instance. - Returns
true
ifapp
is not an object - Returns
false
ifapp
is a base instance and the plugin is not already registered on the instance
var isRegistered = require('is-registered');
function plugin(app) {
if (isRegistered(app, 'base-foo')) return;
// do plugin stuff
}
Related projects
You might also be interested in these projects:
base-plugins: Upgrade's plugin support in base applications to allow plugins to be called any time after… more | homepage
- base: base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting… more | homepage
Contributing
This document was generated by verb, please don't edit directly. Any changes to the readme must be made in .verb.md. See Building Docs.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Building docs
Generate readme and API documentation with verb:
$ npm install -g verb verb-readme-generator && verb
Running tests
Install dev dependencies:
$ npm install -d && npm test
Author
Jon Schlinkert
License
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on June 03, 2016.