Socket
Socket
Sign inDemoInstall

turf

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

11

lib/size.js
module.exports = function(bbox, factor, done){
var lowX = (((bbox[2] - bbox[0]) / 2) * factor) + bbox[0]
var lowY = (((bbox[3] - bbox[1]) / 2) * factor) + bbox[1]
var highX = (((bbox[2] - bbox[0]) / 2) * factor) + bbox[2]
var highY = (((bbox[3] - bbox[1]) / 2) * factor) + bbox[3]
var xDistance = ((bbox[2] - bbox[0]) / 2) * factor
var yDistance = ((bbox[3] - bbox[1]) / 2) * factor
var lowX = bbox[0] - xDistance
var lowY = bbox[1] - yDistance
var highX = xDistance + bbox[2]
var highY = yDistance + bbox[3]
var sized = [lowX, lowY, highX, highY]
done(null, sized)
}
{
"name": "turf",
"version": "0.1.1",
"version": "0.1.2",
"description": "a node.js library for performing geospatial operations with geojson",

@@ -59,2 +59,2 @@ "main": "index.js",

}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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