Socket
Socket
Sign inDemoInstall

tough-cookie

Package Overview
Dependencies
1
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.9.7 to 0.9.8

12

lib/cookie.js

@@ -519,3 +519,10 @@ /*

function Cookie() { }
function Cookie (opts) {
if (typeof opts !== "object") return;
Object.keys(opts).forEach(function (key) {
if (Cookie.prototype.hasOwnProperty(key)) {
this[key] = opts[key] || Cookie.prototype[key];
}
}.bind(this));
}

@@ -696,3 +703,4 @@ Cookie.parse = parse;

var memstore;
function CookieJar(store) {
function CookieJar(store, rejectPublicSuffixes) {
if (rejectPublicSuffixes != null) this.rejectPublicSuffixes = rejectPublicSuffixes;
if (!store) {

@@ -699,0 +707,0 @@ memstore = memstore || require('./memstore');

2

package.json

@@ -6,3 +6,3 @@ {

"keywords": "HTTP cookie cookies set-cookie cookiejar jar RFC6265 RFC2965",
"version": "0.9.7",
"version": "0.9.8",
"homepage": "https://github.com/goinstant/node-cookie",

@@ -9,0 +9,0 @@ "repository": {

@@ -157,2 +157,7 @@ [RFC6265](http://tools.ietf.org/html/rfc6265) Cookies and CookieJar for Node.js

Construction([{options}])
------------
Receives an options object that can contain any Cookie properties, uses the default for unspecified properties.
.toString()

@@ -225,3 +230,3 @@ -----------

Construction
Construction([store = new MemoryCookieStore()][, rejectPublicSuffixes])
------------

@@ -231,2 +236,3 @@

Attributes

@@ -347,3 +353,2 @@ ----------

* Release to NPM
* _full_ RFC5890/RFC5891 canonicalization for domains in `cdomain()`

@@ -350,0 +355,0 @@ * the optional `punycode` requirement implements RFC3492, but RFC6265 requires RFC5891

@@ -1165,2 +1165,27 @@ /*

}
}).addBatch({
"Constructor":{
topic: function () {
return new Cookie({
key: 'test',
value: 'b',
maxAge: 60
});
},
'check for key property': function (c) {
assert.ok(c);
assert.equal(c.key, 'test');
},
'check for value property': function (c) {
assert.equal(c.value, 'b');
},
'check for maxAge': function (c) {
assert.equal(c.maxAge, 60);
},
'check for default values for unspecified properties': function (c) {
assert.equal(c.expires, "Infinity");
assert.equal(c.secure, false);
assert.equal(c.httpOnly, false);
}
}
}).export(module);
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc