fg-cookie

1.0.0 • Public • Published

cookie function

Get, set, or forget cookies.

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

Based on code examples found at:

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 );

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    15
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    15
  • 0.1.3
    8
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i fg-cookie

Weekly Downloads

9

Version

1.0.0

License

MIT

Last publish

Collaborators

  • filamentgroup-admin
  • zachleat
  • jlembeck
  • scottjehl
  • maggiewachs
  • johnmbender