function compare(object, description) {
  var ok = true,
      k; // If we reached here via a recursive call, object may be undefined because
  // not all items in a collection will have the same deep nesting structure.

  if (!object) return false;

  for (k in description) {
    if (_type["default"].object(description[k])) {
      ok = ok && compare(object[k], description[k]);
    } else if (_type["default"].array(description[k])) {
      ok = ok && !!~description[k].indexOf(object[k]);
    } else {
      if (object[k] !== description[k]) return false;
    }
  }

  return ok;
}
Function comparing an object's properties to a given descriptive
object.

@param  {object} object      - The object to compare.
@param  {object} description - The description's mapping.
@return {boolean}            - Whether the object matches the description.