JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 60898
  • Score
    100M100P100Q154074F
  • License MIT

Util for Base that optionally prevents a plugin from being registered more than once on an instance

Package Exports

  • is-registered

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (is-registered) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

is-registered NPM version NPM downloads Build Status

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 if app is a base instance and the named plugin is already registered on the instance.
  • Returns true if app is not an object
  • Returns false if app 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
}

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.