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

@turf/boolean-clockwise

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@turf/boolean-clockwise - npm Package Compare versions

Comparing version 5.1.5 to 6.0.0

index.ts

20

index.js

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

import { getCoords } from '@turf/invariant';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var invariant_1 = require("@turf/invariant");
/**

@@ -7,3 +8,3 @@ * Takes a ring and return true or false whether or not the ring is clockwise or counter-clockwise.

* @name booleanClockwise
* @param {Feature<LineString>} line to be evaluated
* @param {Feature<LineString>|LineString|Array<Array<number>>} line to be evaluated
* @returns {boolean} true/false

@@ -20,11 +21,7 @@ * @example

function booleanClockwise(line) {
// validation
if (!line) throw new Error('line is required');
var type = (line.geometry) ? line.geometry.type : line.type;
if (!Array.isArray(line) && type !== 'LineString') throw new Error('geometry must be a LineString');
var ring = getCoords(line);
var ring = invariant_1.getCoords(line);
var sum = 0;
var i = 1;
var prev, cur;
var prev;
var cur;
while (i < ring.length) {

@@ -38,3 +35,2 @@ prev = cur || ring[0];

}
export default booleanClockwise;
exports.default = booleanClockwise;

28

package.json
{
"name": "@turf/boolean-clockwise",
"version": "5.1.5",
"version": "6.0.0",
"description": "turf boolean-clockwise module",
"main": "main.js",
"module": "main.es.js",
"types": "index.d.ts",
"main": "index",
"files": [
"index.js",
"index.d.ts",
"main.js",
"main.es.js"
"index.ts"
],
"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",
"pretest": "tsc",
"test": "node test.js",
"bench": "node bench.js",
"docs": "node ../../scripts/generate-readmes"

@@ -43,17 +38,12 @@ },

"devDependencies": {
"@std/esm": "*",
"benchmark": "*",
"glob": "*",
"load-json-file": "*",
"rollup": "*",
"typescript": "*",
"tape": "*"
},
"dependencies": {
"@turf/helpers": "^5.1.5",
"@turf/invariant": "^5.1.5"
},
"@std/esm": {
"esm": "js",
"cjs": true
"@turf/helpers": "6.x",
"@turf/invariant": "6.x"
}
}
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