Socket
Socket
Sign inDemoInstall

fetch-cookie

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-cookie - npm Package Compare versions

Comparing version 0.5.0 to 0.6.0

11

index.js

@@ -21,4 +21,13 @@ var denodeify = require('es6-denodeify')(Promise)

.then(function (res) {
var cookies = res.headers.getAll('set-cookie')
var cookies
if (res.headers.getAll) {
// node-fetch v1
cookies = res.headers.getAll('set-cookie')
} else {
// node-fetch v2
var cookie = res.headers.get('set-cookie')
cookies = cookie && cookie.split(',') || []
}
if (!cookies.length) {

@@ -25,0 +34,0 @@ return res

9

package.json
{
"name": "fetch-cookie",
"version": "0.5.0",
"version": "0.6.0",
"description": "Decorator for a `fetch` function to support automatic cookies.",

@@ -23,3 +23,5 @@ "homepage": "https://github.com/valeriangalliat/fetch-cookie",

"scripts": {
"test": "standard"
"lint": "standard",
"prepublish": "npm run lint && npm test",
"test": "mocha"
},

@@ -31,4 +33,7 @@ "dependencies": {

"devDependencies": {
"express": "^4.14.1",
"mocha": "^3.2.0",
"node-fetch": "^1.6.3",
"standard": "^4.0.1"
}
}
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