Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cookie

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookie - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

9

index.js

@@ -17,3 +17,8 @@

if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge);
if (null != opt.maxAge) {
var maxAge = opt.maxAge - 0;
if (isNaN(maxAge)) throw new Error('maxAge should be a Number');
pairs.push('Max-Age=' + maxAge);
}
if (opt.domain) pairs.push('Domain=' + opt.domain);

@@ -35,3 +40,3 @@ if (opt.path) pairs.push('Path=' + opt.path);

var obj = {}
var pairs = str.split(/[;,] */);
var pairs = str.split(/; */);
var dec = opt.decode || decode;

@@ -38,0 +43,0 @@

@@ -5,3 +5,3 @@ {

"description": "cookie parsing and serialization",
"version": "0.1.0",
"version": "0.1.1",
"repository": {

@@ -8,0 +8,0 @@ "type": "git",

@@ -1,2 +0,2 @@

# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) #
# cookie [![Build Status](https://secure.travis-ci.org/defunctzombie/node-cookie.png?branch=master)](http://travis-ci.org/defunctzombie/node-cookie) #

@@ -3,0 +3,0 @@ cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.

@@ -44,2 +44,9 @@

}));
});
test('dates', function() {
assert.deepEqual({ priority: 'true', Path: '/', expires: 'Wed, 29 Jan 2014 17:43:25 GMT' },
cookie.parse('priority=true; expires=Wed, 29 Jan 2014 17:43:25 GMT; Path=/',{
decode: function(value) { return value; }
}));
})

@@ -45,2 +45,6 @@ // builtin

}));
assert.equal('foo=bar; Max-Age=0', cookie.serialize('foo', 'bar', {
maxAge: 0
}));
});

@@ -47,0 +51,0 @@

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