Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@poppinss/hooks

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@poppinss/hooks - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

4

build/src/Hooks/index.d.ts

@@ -21,2 +21,6 @@ import { IocResolverContract } from '@adonisjs/fold';

/**
* Returns a boolean whether a handler has been already registered or not
*/
has(lifecycle: 'before' | 'after', action: string, handler: HooksHandler | string): boolean;
/**
* Register hook handler for a given event and lifecycle

@@ -23,0 +27,0 @@ */

@@ -41,2 +41,13 @@ "use strict";

/**
* Returns a boolean whether a handler has been already registered or not
*/
has(lifecycle, action, handler) {
const handlers = this.hooks[lifecycle].get(action);
const resolvedHandler = this.resolveHandler(handler);
if (!handlers) {
return false;
}
return handlers.has(resolvedHandler);
}
/**
* Register hook handler for a given event and lifecycle

@@ -43,0 +54,0 @@ */

2

package.json
{
"name": "@poppinss/hooks",
"version": "1.0.2",
"version": "1.0.3",
"description": "A no brainer hooks module for execute before/after lifecycle hooks",

@@ -5,0 +5,0 @@ "main": "build/index.js",

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