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

cookie-getter

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookie-getter - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

7

cookie-getter.js

@@ -5,4 +5,7 @@ // simple commonJS cookie reader, best perf according to http://jsperf.com/cookie-parsing

setPos = cookie.indexOf(name + '='),
stopPos = cookie.indexOf(';', setPos);
return !~setPos ? null : cookie.substring(setPos, ~stopPos ? stopPos : undefined).split('=')[1];
stopPos = cookie.indexOf(';', setPos),
res;
if (!~setPos) return null;
res = decodeURIComponent(cookie.substring(setPos, ~stopPos ? stopPos : undefined).split('=')[1]);
return (res.charAt(0) === '{') ? JSON.parse(res) : res;
};

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

"description": "Super light, high performance clientside cookie reader. Common JS and clientmodules compatible.",
"version": "0.0.1",
"version": "0.0.2",
"tags": ["cookie", "cookies", "client", "clientmodules"],

@@ -8,0 +8,0 @@ "repository": {

@@ -5,3 +5,3 @@ # cookie-getter

CommmonJS and [clientmodules](https://github.com/henrikjoreteg/clientmodules) compatible.
CommmonJS and [browserify](http://browserify.org/) compatible.

@@ -13,3 +13,3 @@

Handy to have as a seperate module for easy installation with npm and clientmodules.
Handy to have as a seperate module for easy installation with npm.

@@ -16,0 +16,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