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

turf-square

Package Overview
Dependencies
Maintainers
9
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turf-square - npm Package Compare versions

Comparing version 3.0.10 to 3.0.12

6

package.json
{
"name": "turf-square",
"version": "3.0.10",
"version": "3.0.12",
"description": "turf square module",

@@ -30,5 +30,5 @@ "main": "index.js",

"dependencies": {
"turf-distance": "^3.0.10",
"turf-helpers": "^3.0.10"
"turf-distance": "^3.0.12",
"turf-helpers": "^3.0.12"
}
}
# turf-square
[![build status](https://secure.travis-ci.org/Turfjs/turf-square.png)](http://travis-ci.org/Turfjs/turf-square)
# square
turf square module
Takes a bounding box and calculates the minimum square bounding box that
would contain the input.
**Parameters**
### `turf.square(bbox)`
- `bbox` **[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)>** a bounding box
Takes a bounding box and calculates the minimum square bounding box that would contain the input.
**Examples**
### Parameters
| parameter | type | description |
| --------- | ----------------- | -------------- |
| `bbox` | Array\.\<number\> | a bounding box |
### Example
```js
```javascript
var bbox = [-20,-20,-15,0];

@@ -38,9 +30,15 @@

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** a square surrounding `bbox`
**Returns** `Array.<number>`, a square surrounding `bbox`
---
## Installation
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
Requires [nodejs](http://nodejs.org/).
### Installation
Install this module individually:
```sh

@@ -50,8 +48,6 @@ $ npm install turf-square

## Tests
Or install the Turf module that includes it as a function:
```sh
$ npm test
$ npm install turf
```
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