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

parse-cookies.js

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parse-cookies.js - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

.eslintrc

6

index.js

@@ -8,3 +8,3 @@ /**

*/
export default function parseCookies(raw, dataParser) {
export default function parseCookies (raw, dataParser) {
// if empty string or undefined

@@ -16,5 +16,5 @@ if (typeof raw === 'undefined' || (typeof raw === 'string' && raw === '')) {

return raw.split(';').reduce(function (cookies, cookieString) {
let cookiePair = cookieString.split('=');
let cookiePair = cookieString.split('=');
let cookieContent = cookiePair.length > 1 ? cookiePair[1].trim() : '';
let cookieName = cookiePair[0].trim();
let cookieName = cookiePair[0].trim();

@@ -21,0 +21,0 @@ if (typeof dataParser !== 'undefined') {

{
"name": "parse-cookies.js",
"version": "0.1.1",
"version": "0.1.2",
"description": "Parses document.cookie string into an object (dictionary) by * splitting at ';' and '='.",

@@ -8,2 +8,3 @@ "main": "lib/index.js",

"clean": "rimraf lib/*",
"lint": "eslint test index.js",
"test": "node test/test.main.js | faucet",

@@ -13,3 +14,3 @@ "patch": "npm version patch && npm run build && npm publish",

"major": "npm version major && npm run build && npm publish",
"prebuild": "npm run clean",
"prebuild": "npm run clean && npm run lint & npm run test",
"build": "babel index.js --out-file lib/index.js",

@@ -36,3 +37,6 @@ "postpublish": "git push origin master --follow-tags"

"babel": "latest",
"faucet": "0.0.1",
"eslint": "latest",
"eslint-config-standard": "latest",
"eslint-plugin-standard": "latest",
"faucet": "latest",
"rimraf": "latest",

@@ -39,0 +43,0 @@ "tap-spec": "latest",

@@ -8,2 +8,3 @@ # parse-cookies.js (written in ES6)

[![devDependencies](http://img.shields.io/david/dev/meandmax/parse-cookies.js.svg?style=flat)](https://david-dm.org/meandmax/parse-cookies.js#info=devDependencies&view=table)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

@@ -10,0 +11,0 @@ ### Install:

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