text: 
  var bind = require('bind');
  var cookie = require('cookie');
  var clone = require('clone');
  var defaults = require('defaults');
  var json = require('json');
  var topDomain = require('top-domain');
  
  
  /**
   * Initialize a new `Cookie` with `options`.
   *
   * @param {Object} options
   */
  
  function Cookie (options) {
    this.options(options);
  }
  
  
  /**
   * Get or set the cookie options.
   *
   * @param {Object} options
   *   @field {Number} maxage (1 year)
   *   @field {String} domain
   *   @field {String} path
   *   @field {Boolean} secure
   */
  
  Cookie.prototype.options = function (options) {
    if (arguments.length === 0) return this._options;
  
    options = options || {};
  
    var domain = '.' + topDomain(window.location.href);
  
    // localhost cookies are special: http://curl.haxx.se/rfc/cookie_spec.html
    if (domain === '.localhost') domain = '';
  
    defaults(options, {
      maxage: 31536000000, // default to a year
      path: '/',
      domain: domain
    });
  
    this._options = options;
  };
  
  
  /**
   * Set a `key` and `value` in our cookie.
   *
   * @param {String} key
   * @param {Object} value
   * @return {Boolean} saved
   */
  
  Cookie.prototype.set = function (key, value) {
    try {
      value = json.stringify(value);
      cookie(key, value, clone(this._options));
      return true;
    } catch (e) {
      return false;
    }
  };
  
  
  /**
   * Get a value from our cookie by `key`.
   *
   * @param {String} key
   * @return {Object} value
   */
  
  Cookie.prototype.get = function (key) {
    try {
      var value = cookie(key);
      value = value ? json.parse(value) : null;
      return value;
    } catch (e) {
      return null;
    }
  };
  
  
  /**
   * Remove a value from our cookie by `key`.
   *
   * @param {String} key
   * @return {Boolean} removed
   */
  
  Cookie.prototype.remove = function (key) {
    try {
      cookie(key, null, clone(this._options));
      return true;
    } catch (e) {
      return false;
    }
  };
  
  
  /**
   * Expose the cookie singleton.
   */
  
  module.exports = bind.all(new Cookie());
  
  
  /**
   * Expose the `Cookie` constructor.
   */
  
  module.exports.Cookie = Cookie;