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

chocolate-chip

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chocolate-chip

A tiny cookie toolkit.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
2
Weekly downloads
 
Created
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

Package last updated on 20 Sep 2016

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