New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

electrode-hapi-compat

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electrode-hapi-compat

Electrode Hapi 16/17 utility

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
342
decreased by-15.14%
Maintainers
1
Weekly downloads
 
Created
Source

Electorde Hapi Compatibility Utility

A utility function that detects the Hapi version and return the appropriate plugin function.

Hapi 17 changed the signature of Plugins. This utility provides a simple wrapper for your plugin to support both Hapi 16 and Hapi 17.

Usage

const {universalHapiPlugin} = require("electrode-hapi-compat");

const registers = {
  hapi16: (server, options, next) => {...},
  hapi17: (server, options) => {...}
};
const pkg = {
  name: "MyPackage",
  version: "1.0.0"
};

module.exports = universalHapiPlugin(registers, pkg);

Specify the Hapi 16 and Hapi 17 plugins. This utility reads the Hapi version and returns the appropriate register function.

Install

$ npm install --save electrode-hapi-compat

Contribute

  1. Clone this repo
  2. Make updates
  3. Run tests (requires 100% test coverage)
  4. Submit PR
  5. Sign CLA

To run tests

$ npm run test

Built with :heart: by Team Electrode @WalmartLabs.

Keywords

FAQs

Package last updated on 11 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc