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

simple-cookie

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-cookie - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

26

index.js

@@ -20,7 +20,7 @@ function printExpires(expires){

obj.name+'='+value,
( typeof obj.expires != 'undefined' && obj.expires ? printExpires(obj.expires) : '' ),
( typeof obj.path != 'undefined' ? (obj.path ? 'Path='+obj.path : '') : 'Path=/' ),
( typeof obj.domain != 'undefined' && obj.domain ? 'Domain='+obj.domain : '' ),
( typeof obj.secure != 'undefined' && obj.secure ? 'secure' : '' ),
( typeof obj.httponly != 'undefined' && obj.httponly ? 'HttpOnly' : '' )
( typeof obj.expires != 'undefined' && obj.expires ? printExpires(obj.expires) : '' ),
( typeof obj.path != 'undefined' ? (obj.path ? 'Path='+obj.path : '') : 'Path=/' ),
( typeof obj.domain != 'undefined' && obj.domain ? 'Domain='+obj.domain : '' ),
( typeof obj.secure != 'undefined' && obj.secure ? 'secure' : '' ),
( typeof obj.httponly != 'undefined' && obj.httponly ? 'HttpOnly' : '' )

@@ -31,3 +31,3 @@ ].join(';').replace(/;+/g,';').replace(/;$/,'').replace(/;/g,'; ');

var s = string.replace(/;\s+/g,';').split(';')
.map(function(s){return s.replace(/\s+\=\s+/g,'=').split('=');});
.map(function(s){return s.replace(/\s+\s+/g,'=').split('=');});

@@ -44,9 +44,9 @@ var n = s.shift();

var I, f = {
httponly: function(){ obj.httponly = true; },
secure: function(){ obj.secure = true; },
expires: function(v){ obj.expires = new Date(v); },
'max-age': function(v){ if(obj.expires) return; obj.expires = new Date((new Date()).valueOf()+(v*1000)); },
path: function(v){ obj.path = v; },
domain: function(v){ obj.domain = v; }
};
httponly: function(){ obj.httponly = true; },
secure: function(){ obj.secure = true; },
expires: function(v){ obj.expires = new Date(v); },
'max-age': function(v){ if(obj.expires) return; obj.expires = new Date((new Date()).valueOf()+(v*1000)); },
path: function(v){ obj.path = v; },
domain: function(v){ obj.domain = v; }
};

@@ -53,0 +53,0 @@ for(var i in s) {

{
"name": "simple-cookie",
"version": "1.0.8",
"version": "1.0.9",
"description": "Simple cookie parser & serializer",

@@ -27,6 +27,6 @@ "main": "index.js",

"devDependencies": {
"chai": "^3.5.0",
"eslint": "^3.17.1",
"mocha": "^3.2.0"
"chai": "^4.1.2",
"eslint": "^4.18.2",
"mocha": "^5.0.3"
}
}

@@ -81,7 +81,7 @@

var cc = [
{name:'cookiename1',value:'cookie name 1'},
{name:'cookiename2',value:'cookie name 2'},
{name:'cookiename3',value:'cookie name 3'},
{name:'cookiename4',value:'cookie name 4'},
{name:'cookiename5',value:'cookie name 5'}
{name:'cookiename1',value:'cookie name 1'},
{name:'cookiename2',value:'cookie name 2'},
{name:'cookiename3',value:'cookie name 3'},
{name:'cookiename4',value:'cookie name 4'},
{name:'cookiename5',value:'cookie name 5'}
];

@@ -96,2 +96,2 @@

});
});
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