Socket
Socket
Sign inDemoInstall

chocolate-chip

Package Overview
Dependencies
0
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chocolate-chip

A tiny cookie toolkit.


Version published
Weekly downloads
4
increased by100%
Maintainers
2
Install size
5.82 kB
Created
Weekly downloads
 

Readme

Source

Chocolate Chip

A tiny CommonJS cookie toolkit.

Install

First install Chocolate Chip in your project root.

$ npm install --save chocolate-chip

Then include in your module using require().

var cookie = require('chocolate-chip');

Use

cookie.set('name', 'value'[, opts]);
Options

opts is an object that allows the following options:

  • end: Maximum cookie age in milliseconds or Infinity. Set as GMTString or Date to specify an end date.
  • path: Path from where the cookie will be readable.
  • domain: Domain from where the cookie will be readable
  • secure: Cookie only transmitted over secure protocols if set to true.
cookie.get('name');
cookie.remove('name');

Shorthand for cookie.set(), sets end to Infinity.

cookie.forever('name', 'value'[, opts]);

Keywords

FAQs

Last updated on 20 Sep 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc