docs: function clone(obj) {
      if (typeof obj !== 'object') {
          return obj;
      }
      var ret;
      if (util.isArray(obj)) {
          ret = [];
          obj.forEach(function (val) {
              ret.push(clone(val));
          });
          return ret;
      }
      ret = {};
      Object.keys(obj).forEach(function (key) {
          ret[key] = clone(obj[key]);
      });
      return ret;
  }