# bbox-helper-functions

> Helper functions to convert BBoxes to multiple formats

Latest version **4.0.1** (published 2025-09-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install bbox-helper-functions
pnpm add bbox-helper-functions
yarn add bbox-helper-functions
bun add bbox-helper-functions
```

## Health

**Score 40/100 (D)** — status: maintenance-mode.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.1 |
| Published | 2025-09-17 |
| First published | 2020-09-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 25.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Alberto Rico |
| Maintainers | alrico88 |
| Keywords | bbox, bounding box, polygon, SQL, GeoJSON, wkt |

## Links

- npm: https://www.npmjs.com/package/bbox-helper-functions
- Repository: https://github.com/alrico88/bbox-helper-functions
- Homepage: https://github.com/alrico88/bbox-helper-functions#readme
- Issues: https://github.com/alrico88/bbox-helper-functions/issues
- npm.io page: https://npm.io/package/bbox-helper-functions

## Dependencies (6)

- [dlv](https://npm.io/package/dlv.md) ^1.1.3
- [ngeohash](https://npm.io/package/ngeohash.md) ^0.6.3
- [@turf/bbox](https://npm.io/package/@turf/bbox.md) ^7.2.0
- [@sindresorhus/is](https://npm.io/package/@sindresorhus/is.md) ^7.1.0
- [wkt-parser-helper](https://npm.io/package/wkt-parser-helper.md) ^5.0.0
- [string-object-formatter](https://npm.io/package/string-object-formatter.md) ^4.0.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 4.0.1 (latest) — 2025-09-17
- 4.0.0 — 2025-09-17
- 3.3.0 — 2023-06-30
- 3.2.4 — 2022-03-08
- 3.2.3 — 2022-03-07
- 3.2.2 — 2022-03-07
- 3.2.1 — 2022-03-07
- 3.2.0 — 2022-03-07
- 3.1.0 — 2022-03-05
- 3.0.2 — 2022-02-11
- 3.0.1 — 2021-10-23
- 3.0.0 — 2021-10-23
- 2.4.1 — 2021-09-02
- 2.4.0 — 2021-09-02
- 2.3.2 — 2021-07-28
- … 8 more at https://npm.io/package/bbox-helper-functions/versions

## README

# bbox-helper-functions

## Installation

Using npm `npm i bbox-helper-functions`

Using yarn `yarn add bbox-helper-functions`

## Usage

In CommonJS env

```javascript
const { getWKBBox } = require('bbox-helper-functions');

const bbox = getWKBBox(
  'POLYGON((-3.706512451171875 40.420074462890625,-3.70513916015625 40.420074462890625,-3.70513916015625 40.42144775390625,-3.706512451171875 40.42144775390625,-3.706512451171875 40.420074462890625))',
);

// bbox will be [minLon, minLat, maxLon, maxLat]
```

Using imports

```javascript
import { getGeohashBBox } from 'bbox-helper-functions';

const geohashBBox = getGeohashBBox('ezjmun');

// geohashBBox will be [minLon, minLat, maxLon, maxLat]
```

## Documentation

See [DOCS](./docs/README.md)

---
_Source: https://npm.io/package/bbox-helper-functions · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
