Package Exports
- parse-poly
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-poly) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
parse-poly

Take in any polygon or polyline argument and return array of coordinates. The returned array is always a copy of initial argument.
const parsePoly = require('parse-poly')
// [[10, 20], [30, 40], [50, 60]]
parsePoly('10 20 30 40 50 60')
parsePoly(10, 20, 30, 40, 50, 60)
parsePoly([10, 20, 30, 40, 50, 60])
parsePoly([10, 20], [30, 40], [50, 60])
parsePoly([[10, 20], [30, 40], [50, 60]])
parsePoly(new Float32Array([10, 20, 30, 40, 50, 60]))
parsePoly([new Float32Array([10, 20]), new Float32Array([30, 40]), new Float32Array([50, 60])])
parsePoly([{x: 10, y: 20}, {x: 30, y: 40}, {x: 50, y: 60}])
parsePoly({
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[10, 20], [30, 40], [50, 60]]
}
})
License
(c) 2018 Dmitry Yv. MIT License