{"library":"electrode-hapi-compat","type":"library","category":null,"description":"The `electrode-hapi-compat` utility provides functions to simplify the creation and detection of Hapi.js plugins compatible across different major versions, specifically Hapi 16 and Hapi 17/18+. It directly addresses the breaking change in Hapi plugin signatures introduced with Hapi 17, offering a `universalHapiPlugin` function. This function allows developers to define distinct plugin implementations for Hapi 16 and Hapi 17+ environments, automatically serving the correct version based on the Hapi framework detected in the host application. The package also includes helper functions such as `isHapi17OrUp` and `isHapi18OrUp` for conditional logic and offers a mechanism to manually set the Hapi version for testing. The current stable version is 1.3.3. While not on a strict regular cadence, it receives updates for broader utility, such as supporting other frameworks like Fastify in earlier minor versions. Its primary differentiator is providing a concise, focused solution for Hapi plugin compatibility across significant framework version boundaries.","language":"javascript","status":"maintenance","version":"1.3.3","tags":["javascript","electrode","hapi","plugin"],"last_verified":"Wed May 27","install":[{"cmd":"npm install electrode-hapi-compat","imports":["const { universalHapiPlugin } = require(\"electrode-hapi-compat\");","const { isHapi17OrUp } = require(\"electrode-hapi-compat\");","const { isHapi18OrUp } = require(\"electrode-hapi-compat\");","require(\"electrode-hapi-compat\").hapiVersion;"]},{"cmd":"yarn add electrode-hapi-compat","imports":[]},{"cmd":"pnpm add electrode-hapi-compat","imports":[]}],"homepage":null,"github":"https://github.com/electrode-io/electrode-hapi-compat","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/electrode-hapi-compat","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/electrode-hapi-compat/compatibility"}}