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.1.2 to 1.1.3

16

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

@@ -28,3 +28,3 @@ "main": "build/index.js",

"peerDependencies": {
"@adonisjs/fold": "6.x.x"
"@adonisjs/fold": "^6.0.0"
},

@@ -40,3 +40,3 @@ "peerDependenciesMeta": {

"@adonisjs/require-ts": "^1.0.0",
"@types/node": "^14.6.2",
"@types/node": "^14.11.1",
"commitizen": "^4.2.1",

@@ -46,3 +46,3 @@ "cz-conventional-changelog": "^3.3.0",

"doctoc": "^1.4.0",
"eslint": "^7.7.0",
"eslint": "^7.9.0",
"eslint-config-prettier": "^6.11.0",

@@ -52,9 +52,9 @@ "eslint-plugin-adonis": "^1.0.15",

"github-label-sync": "^2.0.0",
"husky": "^4.2.5",
"husky": "^4.3.0",
"japa": "^3.1.1",
"mrm": "^2.3.5",
"mrm": "^2.5.0",
"np": "^6.5.0",
"npm-audit-html": "^1.4.3",
"prettier": "^2.1.1",
"typescript": "^4.0.2"
"prettier": "^2.1.2",
"typescript": "^4.0.3"
},

@@ -61,0 +61,0 @@ "repository": {

@@ -1,5 +0,5 @@

<div align="center"><img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1557762307/
poppinss_iftxlt.jpg" width="600px"></div>
<div align="center"><img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1557762307/poppinss_iftxlt.jpg" width="600px"></div>
# Hooks
> A no brainer module to execute lifecycle hooks in sequence.

@@ -28,2 +28,3 @@

## How it works?
The hooks class exposes the API to `register`, `remove` and `exec` lifecycle hooks for any number of actions or events. The class API is meant to be used internally and not by the user facing code and this gives you the chance to improve the hooks DX.

@@ -36,2 +37,3 @@

## Installation
Install the package from npm registry as follows:

@@ -47,2 +49,3 @@

## Usage
Use it as follows

@@ -54,4 +57,3 @@

hooks.add('before', 'save', function () {
})
hooks.add('before', 'save', function () {})

@@ -90,3 +92,2 @@ // Later invoke before save hooks

#### exec(lifecycle: 'before' | 'after', action: string, ...data: any[])

@@ -105,3 +106,3 @@

```ts
function onSave () {}
function onSave() {}

@@ -126,2 +127,3 @@ hooks.add('before', 'save', onSave)

#### merge (hooks: Hooks): void
Merge hooks from an existing hooks instance. Useful during class inheritance.

@@ -140,14 +142,10 @@

[circleci-image]: https://img.shields.io/circleci/project/github/poppinss/hooks/master.svg?style=for-the-badge&logo=circleci
[circleci-url]: https://circleci.com/gh/poppinss/hooks "circleci"
[circleci-url]: https://circleci.com/gh/poppinss/hooks 'circleci'
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
[typescript-url]: "typescript"
[typescript-url]: "typescript"
[npm-image]: https://img.shields.io/npm/v/@poppinss/hooks.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@poppinss/hooks "npm"
[npm-url]: https://npmjs.org/package/@poppinss/hooks 'npm'
[license-image]: https://img.shields.io/npm/l/@poppinss/hooks?color=blueviolet&style=for-the-badge
[license-url]: LICENSE.md "license"
[license-url]: LICENSE.md 'license'
[audit-report-image]: https://img.shields.io/badge/-Audit%20Report-blueviolet?style=for-the-badge
[audit-report-url]: https://htmlpreview.github.io/?https://github.com/poppinss/hooks/blob/develop/npm-audit.html "audit-report"
[audit-report-url]: https://htmlpreview.github.io/?https://github.com/poppinss/hooks/blob/develop/npm-audit.html 'audit-report'
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