Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@turf/area

Package Overview
Dependencies
Maintainers
9
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/area - npm Package Compare versions

Comparing version 7.1.0-alpha.7 to 7.1.0-alpha.70

4

dist/esm/index.d.ts
import { Feature, FeatureCollection, Geometry } from 'geojson';
/**
* Takes one or more features and returns their area in square meters.
* Calculates the geodesic area in square meters of one or more polygons.
*
* @name area
* @param {GeoJSON} geojson input GeoJSON feature(s)
* @param {GeoJSON} geojson input polygon(s) as {@link Geometry}, {@link Feature}, or {@link FeatureCollection}
* @returns {number} area in square meters

@@ -9,0 +9,0 @@ * @example

@@ -45,3 +45,3 @@ // index.ts

function ringArea(coords) {
const coordsLength = coords.length;
const coordsLength = coords.length - 1;
if (coordsLength <= 2)

@@ -48,0 +48,0 @@ return 0;

{
"name": "@turf/area",
"version": "7.1.0-alpha.7+0ce6ecca0",
"version": "7.1.0-alpha.70+948cdafaf",
"description": "turf area module",

@@ -66,7 +66,8 @@ "author": "Turf Authors",

"dependencies": {
"@turf/helpers": "^7.1.0-alpha.7+0ce6ecca0",
"@turf/meta": "^7.1.0-alpha.7+0ce6ecca0",
"@turf/helpers": "^7.1.0-alpha.70+948cdafaf",
"@turf/meta": "^7.1.0-alpha.70+948cdafaf",
"@types/geojson": "^7946.0.10",
"tslib": "^2.6.2"
},
"gitHead": "0ce6ecca05829690270fec6d6bed2003495fe0ea"
"gitHead": "948cdafaf70606d2e27fcc79973fa48ee1182067"
}

@@ -7,7 +7,7 @@ # @turf/area

Takes one or more features and returns their area in square meters.
Calculates the geodesic area in square meters of one or more polygons.
### Parameters
* `geojson` **[GeoJSON][1]** input GeoJSON feature(s)
* `geojson` **[GeoJSON][1]** input polygon(s) as [Geometry][2], [Feature][3], or [FeatureCollection][4]

@@ -26,8 +26,14 @@ ### Examples

Returns **[number][2]** area in square meters
Returns **[number][5]** area in square meters
[1]: https://tools.ietf.org/html/rfc7946#section-3
[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[2]: https://tools.ietf.org/html/rfc7946#section-3.1
[3]: https://tools.ietf.org/html/rfc7946#section-3.2
[4]: https://tools.ietf.org/html/rfc7946#section-3.3
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
<!-- This file is automatically generated. Please don't edit it directly. If you find an error, edit the source file of the module in question (likely index.js or index.ts), and re-run "yarn docs" from the root of the turf project. -->

@@ -34,0 +40,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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