1.0.6 • Published 4 years ago
is-polygon v1.0.6
import { isPolygon } from 'is-polygon'
let points = [{x:x1,y:y1},{x:x2,y:y2},{x:x3,x:y3}]
let result = isPolygon(points)
//if legal polygon
console.log(result) // true
// illegal polygon
console.log(result) // false