simple-cookie
Advanced tools
Comparing version 0.1.1 to 0.1.2
14
index.js
@@ -11,5 +11,11 @@ function printExpires(expires){ | ||
stringify: function( obj ){ | ||
var value; | ||
try{ | ||
value = encodeURIComponent(obj.value); | ||
}catch(e){ | ||
value = obj.value; | ||
} | ||
return [ | ||
obj.name+'='+encodeURIComponent(obj.value), | ||
obj.name+'='+value, | ||
( typeof obj.expires != 'undefined' && obj.expires ? printExpires(obj.expires) : '' ), | ||
@@ -52,3 +58,7 @@ ( typeof obj.path != 'undefined' ? (obj.path ? 'Path='+obj.path : '') : 'Path=/' ), | ||
obj.name = n[0]; | ||
obj.value = decodeURIComponent(n[1]); | ||
try{ | ||
obj.value = decodeURIComponent(n[1]); | ||
}catch(e){ | ||
obj.value(n[1]); | ||
} | ||
return obj; | ||
@@ -55,0 +65,0 @@ }, |
{ | ||
"name": "simple-cookie", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "Simple cookie parser & serializer", | ||
@@ -8,3 +8,4 @@ "main": "index.js", | ||
"test": "mocha", | ||
"lint": "jshint *.json *.js" | ||
"lint": "jshint *.json *.js", | ||
"test-cov": "mocha --require blanket -R html-cov > test/coverage.html" | ||
}, | ||
@@ -25,2 +26,8 @@ "repository": { | ||
"homepage": "https://github.com/juji/simple-cookie", | ||
"config": { | ||
"blanket": { | ||
"pattern": "index.js", | ||
"data-cover-never": "node_modules" | ||
} | ||
}, | ||
"devDependencies": { | ||
@@ -30,4 +37,5 @@ "chai": "^1.9.1", | ||
"mocha": "^1.21.4", | ||
"jshint": "^2.5.11" | ||
"jshint": "^2.5.11", | ||
"blanket": "^1.1.6" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
6825
113
5