@turf/line-to-polygon
Advanced tools
Comparing version 6.0.0 to 6.0.1
"use strict"; | ||
exports.__esModule = true; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var bbox_1 = require("@turf/bbox"); | ||
@@ -74,3 +74,3 @@ var invariant_1 = require("@turf/invariant"); | ||
if (orderCoords) { | ||
var area = calculateArea(bbox_1["default"](helpers_1.lineString(coord))); | ||
var area = calculateArea(bbox_1.default(helpers_1.lineString(coord))); | ||
if (area > largestArea) { | ||
@@ -125,2 +125,2 @@ multiCoords.unshift(coord); | ||
} | ||
exports["default"] = lineToPolygon; | ||
exports.default = lineToPolygon; |
{ | ||
"name": "@turf/line-to-polygon", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "turf line-to-polygon module", | ||
"main": "index", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"index.js", | ||
"index.ts" | ||
"index.d.ts" | ||
], | ||
"scripts": { | ||
"prepare": "tsc", | ||
"pretest": "tsc", | ||
@@ -41,6 +43,8 @@ "test": "node test.js", | ||
"tape": "*", | ||
"write-json-file": "*" | ||
"write-json-file": "*", | ||
"tslint": "*", | ||
"@types/tape": "*" | ||
}, | ||
"dependencies": { | ||
"@turf/bbox": "^5.1.5", | ||
"@turf/bbox": "6.x", | ||
"@turf/helpers": "6.x", | ||
@@ -47,0 +51,0 @@ "@turf/invariant": "6.x" |
@@ -11,7 +11,7 @@ # @turf/line-to-polygon | ||
- `lines` **([FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) \| [Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<([LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4) \| [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5))>)** Features to convert | ||
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`) | ||
- `options.properties` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** translates GeoJSON properties to Feature (optional, default `{}`) | ||
- `options.autoComplete` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** auto complete linestrings (matches first & last coordinates) (optional, default `true`) | ||
- `options.orderCoords` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** sorts linestrings to place outer ring at the first position of the coordinates (optional, default `true`) | ||
- `lines` **([FeatureCollection][1] \| [Feature][2]<([LineString][3] \| [MultiLineString][4])>)** Features to convert | ||
- `options` **[Object][5]** Optional parameters (optional, default `{}`) | ||
- `options.properties` **[Object][5]** translates GeoJSON properties to Feature (optional, default `{}`) | ||
- `options.autoComplete` **[boolean][6]** auto complete linestrings (matches first & last coordinates) (optional, default `true`) | ||
- `options.orderCoords` **[boolean][6]** sorts linestrings to place outer ring at the first position of the coordinates (optional, default `true`) | ||
@@ -29,4 +29,20 @@ **Examples** | ||
Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<([Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6) \| [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7))>** converted to Polygons | ||
Returns **[Feature][2]<([Polygon][7] \| [MultiPolygon][8])>** converted to Polygons | ||
[1]: https://tools.ietf.org/html/rfc7946#section-3.3 | ||
[2]: https://tools.ietf.org/html/rfc7946#section-3.2 | ||
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4 | ||
[4]: https://tools.ietf.org/html/rfc7946#section-3.1.5 | ||
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object | ||
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean | ||
[7]: https://tools.ietf.org/html/rfc7946#section-3.1.6 | ||
[8]: https://tools.ietf.org/html/rfc7946#section-3.1.7 | ||
<!-- This file is automatically generated. Please don't edit it directly: | ||
@@ -33,0 +49,0 @@ if you find an error, edit the source file (likely index.js), and re-run |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
70
0
9098
7
4
124
+ Added@turf/bbox@6.5.0(transitive)
+ Added@turf/meta@6.5.0(transitive)
- Removed@turf/bbox@5.1.5(transitive)
- Removed@turf/helpers@5.1.5(transitive)
- Removed@turf/meta@5.2.0(transitive)
Updated@turf/bbox@6.x