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

cookiesmonster

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

cookiesmonster

A small cookie parsing library

  • 1.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source



Cookies Monster



Small cookie parsing library

Build Status

This is a small library to parse cookies from requests in Node.

Install

$ npm install cookiesmonster

Usage

const cookieMonster = require('cookiemonster');

  • Parse request for cookies

const cookies = cookieMonster.get(req);

Pass a default node request, or from express etc. This returns the parsed cookies as an array of objects or empty array.

[
    {
        "name": "_ga",
        "value": "GA1.1.206842275.1547456732"
    }
]
  • Get cookie by name

const cookies = cookieMonster.getByName(req,'randomSite');

This return an object with the name of the site, value of the cookie and if the cookie is not found it returns null.

{
    "name": "randomSite",
    "value": "9cs09ds0cisd"
}

Future features

  • Get cookie by name

Suggestions and pull requests welcome!

Keywords

FAQs

Package last updated on 23 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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