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

cookie-crisp

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cookie-crisp

Get and set browser cookies

  • 0.1.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A small cookie utility for getting, setting, and deleting cookies

init( doc )

Initializes cookie-crisp. Can optionally pass in a reference to document that differs from window.document.

get( cookieName, decode )

Returns a cookie value given a cookie name. By default, the cookie value is decoded before being returned.

set( key, value, opts )

Sets a cookie given a key, value, and a set of options:

opts.path

Path to write cookie (default being /).

opts.days

Days from now that you would like the cookie to expire.

opts.expires

Available if you would like to pass your own GMT expiration date.

opts.encode

Whether or not the cookie key/value should be encoded before being set.

remove( cookieName )

Shortcut for setting a cookie's expiration to Thu, 01 Jan 1970 00:00:01 GMT.

Keywords

FAQs

Package last updated on 12 Feb 2015

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