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

cookie-getter

Package Overview
Dependencies
Maintainers
2
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.2 to 1.0.0

test/index.js

2

cookie-getter.js
// simple commonJS cookie reader, best perf according to http://jsperf.com/cookie-parsing
module.exports = function (name) {
var cookie = document.cookie,
setPos = cookie.indexOf(name + '='),
setPos = cookie.search(new RegExp('\\b' + name + '=')),
stopPos = cookie.indexOf(';', setPos),

@@ -6,0 +6,0 @@ res;

@@ -5,4 +5,9 @@ {

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

@@ -12,3 +17,19 @@ "type": "git",

},
"main": "./cookie-getter.js"
"main": "./cookie-getter.js",
"scripts": {
"test": "node test/index.js | tap-spec",
"lint": "jshint .",
"validate": "npm ls"
},
"devDependencies": {
"jshint": "^2.5.3",
"precommit-hook": "^3.0.0",
"tap-spec": "^4.0.2",
"tape": "^4.2.0"
},
"pre-commit": [
"lint",
"validate",
"test"
]
}
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