Socket
Socket
Sign inDemoInstall

fg-cookie

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fg-cookie

Get, set, forget cookies!


Version published
Weekly downloads
18
increased by63.64%
Maintainers
2
Weekly downloads
 
Created
Source

Get, set, or forget cookies.

  • [c]2014 @scottjehl, Filament Group, Inc.
  • Licensed MIT

Based on code examples found at:

  • http://stackoverflow.com/posts/15724300/revisions by stackoverflow user kirlich
  • http://www.quirksmode.org/js/cookies.html by PPK

API

To get a cookie, pass only a name. It'll return null if undefined.

cookie( "foo" );

To set a cookie, pass a name, a string value, and optionally a number of days until the cookie expires

cookie( "foo", "bar", 5 );

To delete a cookie, pass a name, and a false value

cookie( "foo", false );

Keywords

FAQs

Package last updated on 18 Jul 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