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

node-pluggable

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-pluggable - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

18

index.js
// Generated by CoffeeScript 1.9.1
(function() {
var _, async, pluggable,
var EventEmitter, _, async, pluggable,
slice = [].slice;

@@ -10,4 +10,6 @@

pluggable = {};
EventEmitter = require('events').EventEmitter;
pluggable = new EventEmitter();
pluggable.stack = [];

@@ -59,3 +61,3 @@

pluggable.on = function() {
pluggable.run = function() {
var callback, i, match_param, params;

@@ -74,2 +76,12 @@ match_param = arguments[0], params = 3 <= arguments.length ? slice.call(arguments, 1, i = arguments.length - 1) : (i = 1, []), callback = arguments[i++];

pluggable.bind = function() {
var fn, fns, i, len, match_param;
match_param = arguments[0], fns = 2 <= arguments.length ? slice.call(arguments, 1) : [];
for (i = 0, len = fns.length; i < len; i++) {
fn = fns[i];
pluggable.on(match_param, fn);
}
return pluggable;
};
module.exports = pluggable;

@@ -76,0 +88,0 @@

5

package.json
{
"name": "node-pluggable",
"version": "0.1.0",
"description": "hook",
"version": "0.1.1",
"description": "Add your Hook more easily.",
"main": "index.js",

@@ -14,4 +14,5 @@ "repository": {

"async": "^0.9.0",
"eventproxy": "^0.3.2",
"underscore": "^1.8.2"
}
}

@@ -31,5 +31,13 @@ ## node-pluggable

pluggable.on 'article.create', article, ->
pluggable.run 'article.create', article, ->
console.log article
pluggable.bind 'article.update', (article) ->
console.log article
, (article) ->
console.log article.length
pluggable.emit 'article.update', 'just a message.'
### License

@@ -36,0 +44,0 @@

Sorry, the diff of this file is not supported yet

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