How to keep zoom into limits

I have an object and I can drag the camera all around. To avoid to move the camera too far I have added some check inside the render method:

 render() {

  if (>4) = 4;
  if (>4) = 4;
  if (>4) = 4;

  if (<-4) = -4;
  if (<-4) = -4;
  if (<-4) = -4;

This works. But how to avoid the camera to go to near the object? Have I to set some data range or there is some special property?

Thanks for any suggestion!

Are you using OrbitControls or a custom camera controls implementation?

Yes I use OrbitControls

  let controls = new OrbitControls(, this.renderer.domElement);
  controls.addEventListener('change', this.render);
  controls.enableZoom = true;

If you are using a perspective camera use the minDistance and maxDistance properties to limit zoom/dollying. With an orthographic camera, the properties are minZoom and maxZoom. More information in the documentation:

Thanks! minDistance and maxDistance solved my request.

Three.js has a great documentation but sometimes I get lost, thanks for helping all of us