cookie utility. don't dependency jquery.
motivation
jquery-cookie is awsome!! but jquery ....
Build Status Matrix
Install
browser
npm
npm install tongs
var tongs = require('tongs');
Usage
Set cookie:
cookie'name' 'value';
Set cookie with option:
cookie'name' 'value' expires: 7 path: '/';
Get Cookie:
cookie'name'; // => valuecookie'nothing'; // => undefined
Get all available cookies:
// document.cookie => name1=value1, name2=value2cookie;// => [{name1: value1}, {name2: value2}]
Remove Cookie:
; // => true; // => false //with optioncookie'path_cookie' 'value' path: '/';; // => false; // => true
Get wide domain
// location.hostname => dl.dropboxusercontent.com; // => .dropboxusercontent.com
ex) use cookie across the subdomain
var set_domain = ;cookie'name' 'valkue' domain: set_domain;