# @types/ngeohash

> TypeScript definitions for ngeohash

Latest version **0.6.8** (published 2023-11-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/ngeohash
pnpm add @types/ngeohash
yarn add @types/ngeohash
bun add @types/ngeohash
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.6.8 |
| Published | 2023-11-21 |
| First published | 2016-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51440 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/ngeohash
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ngeohash
- npm.io page: https://npm.io/package/@types/ngeohash

## Recent versions

- 0.6.8 (latest) — 2023-11-21
- 0.6.4 (ts3.6) — 2021-08-04
- 0.6.2 (ts2.0) — 2018-11-29
- 0.6.7 — 2023-11-07
- 0.6.6 — 2023-10-18
- 0.6.5 — 2023-09-23
- 0.6.3 — 2021-07-09
- 0.6.1 — 2016-10-05

## README

# Installation
> `npm install --save @types/ngeohash`

# Summary
This package contains type definitions for ngeohash (https://github.com/sunng87/node-geohash).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ngeohash.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ngeohash/index.d.ts)
````ts
declare namespace ngeohash {
    interface GeographicPoint {
        latitude: number;
        longitude: number;
        error: {
            latitude: number;
            longitude: number;
        };
    }

    type GeographicBoundingBox = [number, number, number, number];
    type NSEW = [number, number];

    function encode(latitude: number | string, longitude: number | string, precision?: number): string;
    function decode(hashstring: string): GeographicPoint;
    function decode_bbox(hashstring: string): GeographicBoundingBox;
    function bboxes(minlat: number, minlon: number, maxlat: number, maxlon: number, precision?: number): string[];
    function neighbor(hashstring: string, direction: NSEW): string;
    function neighbors(hashstring: string): string[];

    function encode_int(latitude: number, longitude: number, bitDepth?: number): number;
    function decode_int(hashinteger: number, bitDepth?: number): GeographicPoint;
    function decode_bbox_int(hashinteger: number, bitDepth?: number): GeographicBoundingBox;
    function bboxes_int(minlat: number, minlon: number, maxlat: number, maxlon: number, bitDepth?: number): number;
    function neighbor_int(hashinteger: number, direction: NSEW, bitDepth?: number): number;
    function neighbors_int(hashinteger: number, bitDepth?: number): number[];
}

declare module "ngeohash" {
    export = ngeohash;
}

````

### Additional Details
 * Last updated: Mon, 20 Nov 2023 23:36:24 GMT
 * Dependencies: none

# Credits
These definitions were written by [Erik Rothoff Andersson](https://github.com/erkie).

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