Util for Base that optionally prevents a plugin from being registered more than once on an instance
Install with npm:
$ npm install is-registered --save
true if app is a base instance and the named plugin is already registered on the instance.true if app is not an objectfalse if app is a base instance and the plugin is not already registered on the instancevar 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
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:
$ npm install -g verb verb-readme-generator && verb
Install dev dependencies:
$ npm install -d && npm test
Jon Schlinkert
Copyright © 2016, Jon Schlinkert. Released under the MIT license.
This file was generated by verb, v0.9.0, on June 03, 2016.