Socket
Socket
Sign inDemoInstall

toxy

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toxy - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

examples/featured.js

@@ -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

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