# gtran-topojson

> convert geojson to topojson

Latest version **1.0.2** (published 2015-11-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install gtran-topojson
pnpm add gtran-topojson
yarn add gtran-topojson
bun add gtran-topojson
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2015-11-29 |
| First published | 2015-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Haoliang Yu |
| Maintainers | haoliang |
| Keywords | geojson, topojson |

## Links

- npm: https://www.npmjs.com/package/gtran-topojson
- Repository: https://github.com/haoliangyu/gtran-topojson
- Homepage: https://github.com/haoliangyu/gtran-topojson#readme
- Issues: https://github.com/haoliangyu/gtran-topojson/issues
- npm.io page: https://npm.io/package/gtran-topojson

## Dependencies (1)

- [topojson](https://npm.io/package/topojson.md) ^1.6.19

## 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

- 1.0.2 (latest) — 2015-11-29
- 1.0.1 — 2015-11-28
- 1.0.0 — 2015-11-26

## README

# gtran-topojson

A simple wrap of Mike Bostock's [topojson](https://github.com/mbostock/topojson) for the consistence with [gtran](https://github.com/haoliangyu/gtran).

## Installation

```javascript
npm install gtran-topojson
```

## Functions

* **setPromiseLib(object)**

    Specify the promise library. If not, the library will use the native Promise.

* **fromGeoJson(geojson)**

    Convert the geojson to topojson.

## Use Example

```javascript
var topo = require('gtran-topojson');

// if specific promise library is needed
topo.setPromiseLib(require('bluebird'));

// Save geojson into KMZ file
topo.fromGeoJson(geojson).then(function(object) {
    var topojson = object;
});

```

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