🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

chaining-tool

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chaining-tool - npm Package Compare versions

Comparing version
0.0.3
to
0.0.4
+1
-1
bower.json
{
"name": "chaining-tool",
"main": "index.js",
"version": "0.0.3",
"version": "0.0.4",
"homepage": "https://github.com/maxazan/chaining-tool",

@@ -6,0 +6,0 @@ "authors": [

{
"name": "chaining-tool",
"version": "0.0.3",
"version": "0.0.4",
"description": "Chain of responsibility",
"main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/maxazan/chaining-tool.git"
},
"directories": {

@@ -7,0 +11,0 @@ "test": "test"

@@ -1,1 +0,36 @@

# chaining-tool
# Chaining tool
Fast way to create chain of responsibility
##Install
```
npm install chaining-tool
```
##Usage
```javascript
var Chain = require('chaining-tool');
var chain = new Chain();
chain.add(function(context, next){
//Do somethong with context
next(); //Next handler
});
chain.add(function(context, next){
//Do somethong with context
next(false); //Interrupt
});
var context = {"some" : "data"};
chain.start(context,
function(context) {
//success
},
function(context) {
//interrupted
}
);
```