docs: function(obj, keys) {
        for (var key in obj) {
          if (obj.hasOwnProperty(key)) {
            if (keys.hasOwnProperty(key)) {
              if (typeof obj[key] !== keys[key])
                throw new Error(format(ERROR.INVALID_TYPE, [typeof obj[key], key]));
            } else {
              var errorStr = "Unknown property, " + key + ". Valid properties are:";
              for (var validKey in keys)
                if (keys.hasOwnProperty(validKey))
                  errorStr = errorStr+" "+validKey;
              throw new Error(errorStr);
            }
          }
        }
      }