src/rect.js
function rectToPoints (rect) {
  const rectPoints = {
    topLeft: {
      x: rect.left,
      y: rect.top
    },
    bottomRight: {
      x: rect.left + rect.width,
      y: rect.top + rect.height
    }
  };

  return rectPoints;
}
function rectToPoints (rect) {
  const rectPoints = {
    topLeft: {
      x: rect.left,
      y: rect.top
    },
    bottomRight: {
      x: rect.left + rect.width,
      y: rect.top + rect.height
    }
  };

  return rectPoints;
}
function rectToPoints ( rect ) { const rectPoints = { topLeft : { x : rect . left , y : rect . top } , bottomRight : { x : rect . left + rect . width , y : rect . top + rect . height } } ; return rectPoints ; }
Returns top-left and bottom-right points of the rectangle
Returns top - left and bottom - right points of the rectangle