# Cookie.js

A cookie reader/creator

#### Credits

based on the functions by Peter-Paul Koch (http://quirksmode.org)

#### Dependencies

Moo.js, String.js

Summary

Cookie.js | A cookie reader/creator
Cookie | Class for creating, getting, and removing cookies.
Properties |
set | Sets a cookie in the browser.
get | Gets the value of a cookie.
remove | Removes a cookie from the browser.

## Cookie

Class for creating, getting, and removing cookies.

Summary

Properties |
set | Sets a cookie in the browser.
get | Gets the value of a cookie.
remove | Removes a cookie from the browser.

### Properties

### set

Sets a cookie in the browser.

#### Arguments

key | the key (name) for the cookie
value | the value to set
duration | optional, how long the cookie should remain (in days); defaults to 1 year.

#### Example

>     Cookie.set("username", "Aaron", 1) //save this for a day

### get

Gets the value of a cookie.

#### Arguments

key | the name of the cookie you wish to retrieve.

#### Example

>     Cookie.get("username") //returns Aaron

### remove

Removes a cookie from the browser.

#### Arguments

key | the name of the cookie to remove

#### Examples

>     Cookie.remove("username") //bye-bye Aaron

My Object Oriented javascript.
Contains String prototypes and Number prototypes.