simple-cookie
Advanced tools
Comparing version 0.0.8 to 0.1.0
18
index.js
@@ -36,9 +36,9 @@ function printExpires(expires){ | ||
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; } | ||
}; | ||
@@ -56,6 +56,6 @@ for(var i in s) { | ||
tokenize: function( array ){ | ||
return array.map(function(s){ return s.name+'='+encodeURIComponent(s.value) }).join('; '); | ||
return array.map(function(s){ return s.name+'='+encodeURIComponent(s.value); }).join('; '); | ||
} | ||
} | ||
}; | ||
module.exports = exports = cookie; |
{ | ||
"name": "simple-cookie", | ||
"version": "0.0.8", | ||
"version": "0.1.0", | ||
"description": "Simple cookie parser & serializer", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "mocha" | ||
"test": "mocha", | ||
"lint": "jshint *.json *.js" | ||
}, | ||
@@ -26,4 +27,5 @@ "repository": { | ||
"chai-as-promised": "^4.1.1", | ||
"mocha": "^1.21.4" | ||
"mocha": "^1.21.4", | ||
"jshint": "^2.5.11" | ||
} | ||
} |
#simple-cookie | ||
simple cookie serializer & parser for node.js | ||
[![NPM Version][npm-image]][npm-url] | ||
##install | ||
@@ -60,1 +62,3 @@ npm install simple-cookie | ||
[jujiyangasli.com](http://jujiyangasli.com) | ||
[npm-image]: https://img.shields.io/npm/v/simple-cookie.svg?style=flat | ||
[npm-url]: https://npmjs.org/package/simple-cookie |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6470
6
64
4