Socket
Socket
Sign inDemoInstall

gangway

Package Overview
Dependencies
Maintainers
2
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gangway - npm Package Compare versions

Comparing version 2.1.0 to 2.2.0

docs/recipes/aborting-requests.md

5

CHANGELOG.md
# Changelog
## 2.2.0
- Gangway will not send a body unless it is specified. Before this
version, it would default to an empty object.
## 2.1.0

@@ -4,0 +9,0 @@

4

docs/readme.md

@@ -11,2 +11,6 @@ # Gangway Documentation

## Recipes
1. [Aborting requests](recipes/aborting-requests.md)
## API

@@ -13,0 +17,0 @@

2

package.json
{
"name": "gangway",
"version": "2.1.0",
"version": "2.2.0",
"description": "A client-side API abstraction layer",

@@ -5,0 +5,0 @@ "engines": {

@@ -22,3 +22,2 @@ var Mock = require('./mock')

message.type(options.type)
.send(options.body)
.query(options.buildQuery(options.query))

@@ -28,2 +27,6 @@ .set(options.headers)

if (options.body) {
message.send(options.body)
}
options.beforeSend(message)

@@ -30,0 +33,0 @@

@@ -34,3 +34,3 @@ /**

return next ? assign(memo, next, {
body : assign(memo.body, next.body),
body : next.body ? assign(memo.body, next.body) : next.body,
params : assign(memo.params, next.params),

@@ -37,0 +37,0 @@ query : assign(memo.query, next.query),

@@ -11,2 +11,7 @@ var prepare = require('../src/prepare')

it ('does not set the body to an object if not given one', function() {
var answer = prepare({}, undefined, { fiz: 'buzz'})
assert.equal(answer.body, undefined)
})
})
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