Super light, high performance clientside cookie reader. Common JS and clientmodules compatible.
Super simple, performant, clientside CommonJS cookie reader and nothing else.
CommmonJS and browserify compatible.
Dead simple 4-line function that has the best performance according to: http://jsperf.com/cookie-parsing
Handy to have as a seperate module for easy installation with npm.
npm install cookie-getter
var cookies = ;// returns the value of the cookie if it's just a simple stringvar username = ;// if the cookie is a JSON string it will parse it as welluser = ;console; // logs out name of firstName value if encoded as JSON in cookie.