New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cookie-monster

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookie-monster - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

13

index.js
'use strict';
var exports = module.exports = function (doc) {
exports = module.exports = function (doc) {
if (!doc) doc = {};

@@ -13,6 +13,5 @@ if (typeof doc === 'string') doc = { cookie: doc };

var ps = cookiesSplat[i].split('=');
var k = unescape(ps[0]);
if (k === key) return unescape(ps[1]);
var k = decodeURIComponent(ps[0]);
if (k === key) return decodeURIComponent(ps[1]);
}
return undefined;
};

@@ -22,3 +21,3 @@

if (!opts) opts = {};
var newCookie = escape(key) + '=' + escape(value);
var newCookie = encodeURIComponent(key) + '=' + encodeURIComponent(value);

@@ -30,3 +29,3 @@ if (opts.expires){

if (opts.path) {
newCookie += '; path=' + escape(opts.path);
newCookie += '; path=' + opts.path;
}

@@ -39,3 +38,3 @@

if (opts.secure) {
newCookie += '; secure'
newCookie += '; secure';
}

@@ -42,0 +41,0 @@

{
"name": "cookie-monster",
"description": "Browserify-compatible module to get and set cookies in the browser",
"version": "0.0.6",
"version": "0.0.7",
"repository": {

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

@@ -18,2 +18,7 @@ var cookie = require('../index');

});
it('sets and gets cookie with `=` in value', function () {
cookie.set('key', 'val=ue');
cookie.get('key').should.equal('val=ue');
});
});
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