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
6
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.2.0-alpha.1 to 6.2.0-alpha.2

7

dist/es/index.js
import turfBBox from '@turf/bbox';
import { getCoords, getGeom } from '@turf/invariant';
import { polygon, multiPolygon, lineString } from '@turf/helpers';
import clone from '@turf/clone';
/**

@@ -13,2 +14,3 @@ * Converts (Multi)LineString(s) to Polygon(s).

* @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates
* @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)
* @returns {Feature<Polygon|MultiPolygon>} converted to Polygons

@@ -29,5 +31,10 @@ * @example

var orderCoords = options.orderCoords;
var mutate = options.mutate;
// default params
autoComplete = (autoComplete !== undefined) ? autoComplete : true;
orderCoords = (orderCoords !== undefined) ? orderCoords : true;
mutate = (mutate !== undefined) ? mutate : false;
if (!mutate) {
lines = clone(lines);
}
switch (lines.type) {

@@ -34,0 +41,0 @@ case 'FeatureCollection':

2

dist/js/index.d.ts

@@ -11,2 +11,3 @@ import { Feature, FeatureCollection, MultiLineString, LineString, Polygon, MultiPolygon, Properties } from '@turf/helpers';

* @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates
* @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)
* @returns {Feature<Polygon|MultiPolygon>} converted to Polygons

@@ -25,2 +26,3 @@ * @example

orderCoords?: boolean;
mutate?: boolean;
}): Feature<MultiPolygon, {

@@ -27,0 +29,0 @@ [name: string]: any;

@@ -9,2 +9,3 @@ "use strict";

var helpers_1 = require("@turf/helpers");
var clone_1 = __importDefault(require("@turf/clone"));
/**

@@ -19,2 +20,3 @@ * Converts (Multi)LineString(s) to Polygon(s).

* @param {boolean} [options.orderCoords=true] sorts linestrings to place outer ring at the first position of the coordinates
* @param {boolean} [options.mutate=false] mutate the original linestring using autoComplete (matches first & last coordinates)
* @returns {Feature<Polygon|MultiPolygon>} converted to Polygons

@@ -35,5 +37,10 @@ * @example

var orderCoords = options.orderCoords;
var mutate = options.mutate;
// default params
autoComplete = (autoComplete !== undefined) ? autoComplete : true;
orderCoords = (orderCoords !== undefined) ? orderCoords : true;
mutate = (mutate !== undefined) ? mutate : false;
if (!mutate) {
lines = clone_1.default(lines);
}
switch (lines.type) {

@@ -40,0 +47,0 @@ case 'FeatureCollection':

12

package.json
{
"name": "@turf/line-to-polygon",
"version": "6.2.0-alpha.1",
"version": "6.2.0-alpha.2",
"description": "turf line-to-polygon module",

@@ -50,2 +50,3 @@ "author": "Turf Authors",

"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",

@@ -57,7 +58,8 @@ "tslint": "*",

"dependencies": {
"@turf/bbox": "^6.2.0-alpha.1",
"@turf/helpers": "^6.2.0-alpha.1",
"@turf/invariant": "^6.2.0-alpha.1"
"@turf/bbox": "^6.2.0-alpha.2",
"@turf/clone": "^6.2.0-alpha.2",
"@turf/helpers": "^6.2.0-alpha.2",
"@turf/invariant": "^6.2.0-alpha.2"
},
"gitHead": "fc519c045a8931c1e14eab9160a7e28391f8da02"
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09"
}
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