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

@turf/circle

Package Overview
Dependencies
Maintainers
4
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/circle - npm Package Compare versions

Comparing version 5.0.4 to 5.1.0

main.mjs

8

main.js

@@ -35,6 +35,6 @@ 'use strict';

// validation
if (!center) throw new Error('center is required');
if (!radius) throw new Error('radius is required');
if (typeof options !== 'object') throw new Error('options must be an object');
if (typeof steps !== 'number') throw new Error('steps must be a number');
if (!center) { throw new Error('center is required'); }
if (!radius) { throw new Error('radius is required'); }
if (typeof options !== 'object') { throw new Error('options must be an object'); }
if (typeof steps !== 'number') { throw new Error('steps must be a number'); }

@@ -41,0 +41,0 @@ // default params

{
"name": "@turf/circle",
"version": "5.0.4",
"version": "5.1.0",
"description": "turf circle module",
"main": "main",
"module": "index",
"jsnext:main": "index",
"main": "main.js",
"module": "main.mjs",
"types": "index.d.ts",

@@ -12,3 +11,4 @@ "files": [

"index.d.ts",
"main.js"
"main.js",
"main.mjs"
],

@@ -18,3 +18,4 @@ "scripts": {

"test": "node -r @std/esm test.js",
"bench": "node -r @std/esm bench.js"
"bench": "node -r @std/esm bench.js",
"docs": "node ../../scripts/generate-readmes"
},

@@ -42,6 +43,7 @@ "repository": {

"@std/esm": "*",
"@turf/truncate": "^5.0.4",
"@turf/truncate": "^5.1.0",
"benchmark": "*",
"load-json-file": "*",
"rollup": "*",
"rollup-plugin-buble": "*",
"tape": "*",

@@ -51,4 +53,4 @@ "write-json-file": "*"

"dependencies": {
"@turf/destination": "^5.0.4",
"@turf/helpers": "^5.0.4"
"@turf/destination": "^5.1.0",
"@turf/helpers": "^5.1.0"
},

@@ -55,0 +57,0 @@ "@std/esm": {

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

Takes a [Point](http://geojson.org/geojson-spec.html#point) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.
Takes a [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2) and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.
**Parameters**
- `center` **([Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Point](http://geojson.org/geojson-spec.html#point)> | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>)** center point
- `center` **([Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)> | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>)** center point
- `radius` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** radius of the circle

@@ -31,3 +31,3 @@ - `options` **[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Optional parameters (optional, default `{}`)

Returns **[Feature](http://geojson.org/geojson-spec.html#feature-objects)<[Polygon](http://geojson.org/geojson-spec.html#polygon)>** circle polygon
Returns **[Feature](https://tools.ietf.org/html/rfc7946#section-3.2)<[Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)>** circle polygon

@@ -34,0 +34,0 @@ <!-- This file is automatically generated. Please don't edit it directly:

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