Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@turf/transform-rotate

Package Overview
Dependencies
8
Maintainers
6
Versions
29
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.1.5 to 6.2.0-alpha.1

dist/es/index.js

75

package.json
{
"name": "@turf/transform-rotate",
"version": "5.1.5",
"version": "6.2.0-alpha.1",
"description": "turf transform-rotate module",
"main": "main.js",
"module": "main.es.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.d.ts",
"main.js",
"main.es.js"
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>",
"Denis Carriere <@DenisCarriere>"
],
"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"
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {

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

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

@@ -32,15 +29,22 @@ "turf",

],
"author": "Turf Authors",
"contributors": [
"Stefano Borghi <@stebogit>",
"Denis Carriere <@DenisCarriere>"
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"types": "index.d.ts",
"sideEffects": false,
"files": [
"dist",
"index.d.ts"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
"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",
"test:types": "tsc --noEmit types.ts"
},
"homepage": "https://github.com/Turfjs/turf",
"devDependencies": {
"@std/esm": "*",
"@turf/truncate": "^5.1.5",
"@turf/truncate": "^6.2.0-alpha.1",
"benchmark": "*",

@@ -53,15 +57,12 @@ "load-json-file": "*",

"dependencies": {
"@turf/centroid": "^5.1.5",
"@turf/clone": "^5.1.5",
"@turf/helpers": "^5.1.5",
"@turf/invariant": "^5.1.5",
"@turf/meta": "^5.1.5",
"@turf/rhumb-bearing": "^5.1.5",
"@turf/rhumb-destination": "^5.1.5",
"@turf/rhumb-distance": "^5.1.5"
"@turf/centroid": "^6.2.0-alpha.1",
"@turf/clone": "^6.2.0-alpha.1",
"@turf/helpers": "^6.2.0-alpha.1",
"@turf/invariant": "^6.2.0-alpha.1",
"@turf/meta": "^6.2.0-alpha.1",
"@turf/rhumb-bearing": "^6.2.0-alpha.1",
"@turf/rhumb-destination": "^6.2.0-alpha.1",
"@turf/rhumb-distance": "^6.2.0-alpha.1"
},
"@std/esm": {
"esm": "js",
"cjs": true
}
"gitHead": "fc519c045a8931c1e14eab9160a7e28391f8da02"
}

@@ -8,11 +8,11 @@ # @turf/transform-rotate

Rotates any geojson Feature or Geometry of a specified angle, around its `centroid` or a given `pivot` point;
all rotations follow the right-hand rule: <https://en.wikipedia.org/wiki/Right-hand_rule>
all rotations follow the right-hand rule: [https://en.wikipedia.org/wiki/Right-hand_rule][1]
**Parameters**
- `geojson` **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** object to be rotated
- `angle` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** of rotation (along the vertical axis), from North in decimal degrees, negative clockwise
- `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`)
- `options.pivot` **[Coord](https://tools.ietf.org/html/rfc7946#section-3.1.1)** point around which the rotation will be performed (optional, default `'centroid'`)
- `options.mutate` **[boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)
- `geojson` **[GeoJSON][2]** object to be rotated
- `angle` **[number][3]** of rotation (along the vertical axis), from North in decimal degrees, negative clockwise
- `options` **[Object][4]** Optional parameters (optional, default `{}`)
- `options.pivot` **[Coord][5]** point around which the rotation will be performed (optional, default `'centroid'`)
- `options.mutate` **[boolean][6]** allows GeoJSON input to be mutated (significant performance increase if true) (optional, default `false`)

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

Returns **[GeoJSON](https://tools.ietf.org/html/rfc7946#section-3)** the rotated GeoJSON feature
Returns **[GeoJSON][2]** the rotated GeoJSON feature
[1]: https://en.wikipedia.org/wiki/Right-hand_rule
[2]: https://tools.ietf.org/html/rfc7946#section-3
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[5]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[6]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean
<!-- This file is automatically generated. Please don't edit it directly:

@@ -35,0 +47,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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc