New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@turf/line-to-polygon

Package Overview
Dependencies
Maintainers
4
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/line-to-polygon - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

6

index.js
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc