docs: function jsonConverter(value, key, obj) {
      if (value !== null && typeof value === 'object') {
        // Recurse into children
        _.each(value, jsonConverter);
      } else if (typeof value === 'string') {
        // handle special cases (regex/number/date)
        if (key === '$regex') {
          const m = value.match(/\/(.*)\//);
          if (m) {
            if (obj.$options) {
              m[2] = obj.$options;
              // eslint-disable-next-line no-param-reassign
              delete obj.$options;
            }
            // eslint-disable-next-line no-param-reassign
            obj[key] = new RegExp(m[1], m[2]);
          }
        } else if (/^oid:[a-fA-F0-9]{24}$/.test(value)) {
          // eslint-disable-next-line no-param-reassign, prefer-destructuring
          obj[key] = value.split(':')[1];
        } else {
          // check if date to convert it
          const date = parseDateCustom(value);
          if (!Number.isNaN(date)) {
            // eslint-disable-next-line no-param-reassign
            obj[key] = date;
          }
        }
      }
    }