/cookies

Some simple methods for working with cookies in browsers

Primary LanguageJavaScriptMIT LicenseMIT

Cookies

Some methods that make it easy to work with cookies

Usage

You can access the methods via a global variable named cookies from everywhere.

// Returns an object of all the cookies
cookies.getAll();

// Set a new cookie i.e. key=value
cookies.set('key', 'value');

// Returns the value of the cookie with that key name
cookies.get('key');

// Removes the value of the cookie with that key name
cookies.remove('key');