function connectPoints(a, b, directions) {

  var points = getBendpoints(a, b, directions);

  points.unshift(a);
  points.push(b);

  return withoutRedundantPoints(points);
}
Create a connection between the two points according
to the manhattan layout (only horizontal and vertical) edges.

@param {Point} a
@param {Point} b
@param {string} [directions='h:h'] Specifies manhattan directions for each
point as {direction}:{direction}. A direction for a point is either
`h` (horizontal) or `v` (vertical).

@return {Point[]}