code: function findClosestPoint (sources, target) {
    const distances = [];
    let minDistance;
  
    sources.forEach(function (source, index) {
      const d = distance(source, target);
  
      distances.push(d);
  
      if (index === 0) {
        minDistance = d;
      } else {
        minDistance = Math.min(d, minDistance);
      }
    });
  
    const index = distances.indexOf(minDistance);
  
  
    return sources[index];
  }
docs: Returns the closest source point to a target point
  given an array of source points.
  
  @param sources An Array of source Points
  @param target The target Point
  @returns Point The closest point from the points array