Util for Base that optionally prevents a plugin from being registered more than once on an instance
npm install is-registeredUtil for Base that optionally prevents a plugin from being registered more than once on an instance
Install with npm:
``sh`
$ npm install is-registered --save
* Returns true if app is a base instance and the named plugin is already registered on the instance.true
* Returns if app is not an objectfalse
* Returns if app is a base instance and the plugin is not already registered on the instance
`js
var isRegistered = require('is-registered');
function plugin(app) {
if (isRegistered(app, 'base-foo')) return;
// do plugin stuff
}
`
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
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.
Generate readme and API documentation with verb:
`sh`
$ npm install -g verb verb-readme-generator && verb
Install dev dependencies:
`sh``
$ npm install -d && npm test
Jon Schlinkert
* github/jonschlinkert
* twitter/jonschlinkert
Copyright © 2016, Jon Schlinkert.
Released under the MIT license.
*
_This file was generated by verb, v0.9.0, on June 03, 2016._