src/index.js
// (3 points as minimum, otherwise returns null)
(3 points as minimum, otherwise returns null)
( 3 points as minimum otherwise returns null )
function polygonGenerator(groupId) {
  const nodeCoords = node
    .filter(d => +d.group === +groupId)
    .data()
    .map(d => [d.x, d.y]);
  return d3.polygonHull(nodeCoords);
}
function polygonGenerator ( groupId ) { const nodeCoords = node . filter ( d => + d . group === + groupId ) . data ( ) . map ( d => [ d . x , d . y ] ) ; return d3 . polygonHull ( nodeCoords ) ; }
(3 points as minimum, otherwise returns null)
( 3 points as minimum otherwise returns null )