
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
node-pluggable
Advanced tools
Add your Hook more easily.
npm install node-pluggable
Pluggable = require 'node-pluggable'
plugin = new Pluggable()
plugin.use('article.create', (article, next) ->
article.hook = 'article.create'
next()
)
match_param
must be string
or regex
hook_callback
will be called when param
is matchedarticle =
title: 'title'
author: 'author'
content: 'content'
plugin.run 'article.create', article, ->
console.log article
param
will match with match_param
, which must be string
hook_callback_params
will be send to hook_callback
plugin.bind 'article.update', (article) ->
console.log article
, (article) ->
console.log article.length
hook_callback
will be called when event be emittedplugin.on 'article.update', (article) ->
console.log article
bind
plugin.emit 'article.update', 'just a message.'
FAQs
Add your Hook more easily.
We found that node-pluggable demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.