🚀 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.1
to
0.0.2
+21
bower.json
{
"name": "chaining-tool",
"main": "index.js",
"version": "0.0.2",
"homepage": "https://github.com/maxazan/chaining-tool",
"authors": [
"Maksym Pomazan"
],
"description": "Chain of responsobility",
"keywords": [
"chain"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
module.exports = require('./lib/chain.js');
+2
-1

@@ -7,3 +7,3 @@ /**

//add handlers
this.handlers = handlers;
this.handlers = handlers || [];
this.oncomplete = null;

@@ -45,2 +45,3 @@ this.onbreak = null;

if (arguments.length === 0 || arguments.length === 1 && arguments[0] === true) {
if (self.handlers[i]) {

@@ -47,0 +48,0 @@ self.handlers[i](context, self.next(i + 1, context));

{
"name": "chaining-tool",
"version": "0.0.1",
"version": "0.0.2",
"description": "Chain of responsibility",

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

@@ -91,5 +91,5 @@ var assert = require("assert");

var handlers = [];
for (var i = 0; i < 2000; i++) {
for (var i = 0; i < 1500; i++) {
handlers.push(function(context, next) {
console.log("");
var f="sdfsdfsfdsfsdd";
next();

@@ -106,4 +106,3 @@ });

var diff_kb = (after - before) / 1024;
console.log(diff_kb);
assert.ok(diff_kb < 4000, "A lot memmory usage >100Mb for 1M instances");
assert.ok(diff_kb < 300, "A lot memmory usage >300Kb");
done();

@@ -110,0 +109,0 @@ };