Comparing version 0.1.1 to 0.1.2
@@ -19,3 +19,3 @@ const toxy = require('..') | ||
.poison(poisons.inject({ code: 502, body: 'Error!', headers: { 'X-Toxy-Poison': 'error' } })) | ||
.withRule(rules.probability(25)) | ||
.withRule(rules.probability(20)) | ||
@@ -22,0 +22,0 @@ route |
@@ -10,5 +10,5 @@ module.exports = function probability(num) { | ||
var notMatches = !(rand > perc) | ||
var notMatches = rand > perc | ||
next(null, notMatches) | ||
} | ||
} |
{ | ||
"name": "toxy", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Hackable HTTP proxy to simulate server failure scenarios and unexpected conditions", | ||
@@ -35,3 +35,2 @@ "repository": "h2non/toxy", | ||
"dependencies": { | ||
"i": "^0.3.3", | ||
"midware": "^0.1.3", | ||
@@ -38,0 +37,0 @@ "raw-body": "^2.1.2", |
@@ -41,3 +41,3 @@ # toxy [![Build Status](https://api.travis-ci.org/h2non/toxy.svg?branch=master&style=flat)](https://travis-ci.org/h2non/toxy) [![Code Climate](https://codeclimate.com/github/h2non/toxy/badges/gpa.svg)](https://codeclimate.com/github/h2non/toxy) [![NPM](https://img.shields.io/npm/v/toxy.svg)](https://www.npmjs.org/package/toxy) ![Stability](http://img.shields.io/badge/stability-beta-orange.svg?style=flat) | ||
- [Built-in rules](#built-in-rules) | ||
- [Probability](#Probability) | ||
- [Probability](#probability) | ||
- [Method](#method) | ||
@@ -345,3 +345,3 @@ - [Headers](#headers) | ||
Rules are executed in FIFO order. Their evaluation logic is comparable to `Array#every()` in JavaScript: all the rules must match in order to proceed with the poisoning. | ||
Rules are executed in FIFO order. Their evaluation logic is equivalent to `Array#every()` in JavaScript: all the rules must pass in order to proceed with the poisoning. | ||
@@ -348,0 +348,0 @@ ### Built-in rules |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
69942