Socket
Socket
Sign inDemoInstall

@turf/point-on-feature

Package Overview
Dependencies
Maintainers
6
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/point-on-feature - npm Package Compare versions

Comparing version 5.1.5 to 6.2.0-alpha.1

dist/es/index.js

66

package.json
{
"name": "@turf/point-on-feature",
"version": "5.1.5",
"version": "6.2.0-alpha.1",
"description": "turf point-on-feature module",
"main": "main.js",
"module": "main.es.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts",
"main.js",
"main.es.js"
],
"scripts": {
"pretest": "rollup -c ../../rollup.config.js",
"test": "node -r @std/esm test.js",
"posttest": "node -r @std/esm ../../scripts/validate-es5-dependencies.js",
"bench": "node -r @std/esm bench.js",
"docs": "node ../../scripts/generate-readmes"
"author": "Turf Authors",
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {

@@ -25,2 +15,5 @@ "type": "git",

},
"publishConfig": {
"access": "public"
},
"keywords": [

@@ -34,12 +27,22 @@ "turf",

],
"author": "Turf Authors",
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"types": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"scripts": {
"bench": "npm-run-all prepare bench:run",
"bench:run": "node bench.js",
"docs": "node ../../scripts/generate-readmes",
"posttest": "node -r esm ../../scripts/validate-es5-dependencies.js",
"prepare": "rollup -c ../../rollup.config.js",
"test": "npm-run-all prepare test:*",
"test:tape": "node -r esm test.js"
},
"homepage": "https://github.com/Turfjs/turf",
"devDependencies": {
"@std/esm": "*",
"@turf/meta": "^5.1.5",
"@turf/truncate": "^5.1.5",
"@turf/meta": "^6.2.0-alpha.1",
"@turf/truncate": "^6.2.0-alpha.1",
"benchmark": "*",

@@ -50,12 +53,9 @@ "rollup": "*",

"dependencies": {
"@turf/boolean-point-in-polygon": "^5.1.5",
"@turf/center": "^5.1.5",
"@turf/explode": "^5.1.5",
"@turf/helpers": "^5.1.5",
"@turf/nearest-point": "^5.1.5"
"@turf/boolean-point-in-polygon": "^6.2.0-alpha.1",
"@turf/center": "^6.2.0-alpha.1",
"@turf/explode": "^6.2.0-alpha.1",
"@turf/helpers": "^6.2.0-alpha.1",
"@turf/nearest-point": "^6.2.0-alpha.1"
},
"@std/esm": {
"esm": "js",
"cjs": true
}
"gitHead": "fc519c045a8931c1e14eab9160a7e28391f8da02"
}

@@ -7,11 +7,11 @@ # @turf/point-on-feature

Takes a Feature or FeatureCollection and returns a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) guaranteed to be on the surface of the feature.
Takes a Feature or FeatureCollection and returns a [Point][1] guaranteed to be on the surface of the feature.
- Given a [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6), the point will be in the area of the polygon
- Given a [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4), the point will be along the string
- Given a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2), the point will the same as the input
- Given a [Polygon][2], the point will be in the area of the polygon
- Given a [LineString][3], the point will be along the string
- Given a [Point][1], the point will the same as the input
**Parameters**
- `geojson` **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** any Feature or FeatureCollection
- `geojson` **[GeoJSON][4]** any Feature or FeatureCollection

@@ -37,4 +37,16 @@ **Examples**

Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)>** a point on the surface of `input`
Returns **[Feature][5]<[Point][6]>** a point on the surface of `input`
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.6
[3]: https://tools.ietf.org/html/rfc7946#section-3.1.4
[4]: https://tools.ietf.org/html/rfc7946#section-3
[5]: https://tools.ietf.org/html/rfc7946#section-3.2
[6]: https://tools.ietf.org/html/rfc7946#section-3.1.2
<!-- This file is automatically generated. Please don't edit it directly:

@@ -41,0 +53,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