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

@turf/circle

Package Overview
Dependencies
Maintainers
6
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 6.2.0-alpha.2 to 6.2.0-alpha.3

dist/es/package.json

13

dist/es/index.js

@@ -1,3 +0,3 @@

import destination from '@turf/destination';
import { polygon } from '@turf/helpers';
import destination from "@turf/destination";
import { polygon, } from "@turf/helpers";
/**

@@ -27,7 +27,12 @@ * Takes a {@link Point} and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.

var steps = options.steps || 64;
var properties = options.properties ? options.properties : (!Array.isArray(center) && center.type === 'Feature' && center.properties) ? center.properties : {};
var properties = options.properties
? options.properties
: !Array.isArray(center) && center.type === "Feature" && center.properties
? center.properties
: {};
// main
var coordinates = [];
for (var i = 0; i < steps; i++) {
coordinates.push(destination(center, radius, i * -360 / steps, options).geometry.coordinates);
coordinates.push(destination(center, radius, (i * -360) / steps, options).geometry
.coordinates);
}

@@ -34,0 +39,0 @@ coordinates.push(coordinates[0]);

@@ -1,2 +0,2 @@

import { Units, Point, Properties, Feature, Polygon } from '@turf/helpers';
import { Units, Point, Properties, Feature, Polygon } from "@turf/helpers";
/**

@@ -3,0 +3,0 @@ * Takes a {@link Point} and calculates the circle polygon given a radius in degrees, radians, miles, or kilometers; and steps for precision.

@@ -32,7 +32,12 @@ "use strict";

var steps = options.steps || 64;
var properties = options.properties ? options.properties : (!Array.isArray(center) && center.type === 'Feature' && center.properties) ? center.properties : {};
var properties = options.properties
? options.properties
: !Array.isArray(center) && center.type === "Feature" && center.properties
? center.properties
: {};
// main
var coordinates = [];
for (var i = 0; i < steps; i++) {
coordinates.push(destination_1.default(center, radius, i * -360 / steps, options).geometry.coordinates);
coordinates.push(destination_1.default(center, radius, (i * -360) / steps, options).geometry
.coordinates);
}

@@ -39,0 +44,0 @@ coordinates.push(coordinates[0]);

{
"name": "@turf/circle",
"version": "6.2.0-alpha.2",
"version": "6.2.0-alpha.3",
"description": "turf circle module",

@@ -28,2 +28,6 @@ "author": "Turf Authors",

"module": "dist/es/index.js",
"exports": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
},
"types": "dist/js/index.d.ts",

@@ -35,15 +39,14 @@ "sideEffects": false,

"scripts": {
"bench": "npm-run-all prepare bench:run",
"bench:run": "node bench.js",
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"prepare": "npm-run-all prepare:*",
"prepare:es": "tsc --outDir dist/es --module esnext --declaration false",
"prepare:js": "tsc",
"test": "npm-run-all prepare test:*",
"test:tape": "node -r esm test.js",
"test:types": "tsc --noEmit types.ts"
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js",
"test:types": "tsc --esModuleInterop --noEmit types.ts"
},
"devDependencies": {
"@mapbox/geojsonhint": "*",
"@turf/truncate": "^6.2.0-alpha.2",
"@turf/truncate": "^6.2.0-alpha.3",
"@types/tape": "*",

@@ -54,2 +57,3 @@ "benchmark": "*",

"tape": "*",
"ts-node": "*",
"tslint": "*",

@@ -60,6 +64,6 @@ "typescript": "*",

"dependencies": {
"@turf/destination": "^6.2.0-alpha.2",
"@turf/helpers": "^6.2.0-alpha.2"
"@turf/destination": "^6.2.0-alpha.3",
"@turf/helpers": "^6.2.0-alpha.3"
},
"gitHead": "23d5cb91d77e0c1e2e903a2252f525797f1d0d09"
"gitHead": "dce9edfc705352e8cb9e0083c9330ba0e8d77409"
}
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