# detect-geocsv

> Detects geocsv files from first 100 bytes.

Latest version **0.1.0** (published 2016-08-04) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install detect-geocsv
pnpm add detect-geocsv
yarn add detect-geocsv
bun add detect-geocsv
```

Provides the command `detect-geocsv`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2016-08-04 |
| First published | 2015-05-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Jake Pruitt |
| Maintainers | aaronlidman, ajashton, ansis, bergwerkgis, bsudekum, camilleanne, dnomadb, dthompson, emilymcafee, flippmoke, freenerd, gretacb, ian29, ianshward, ingalls, jfirebaugh, jrpruit1, karenzshea, kkaefer, lbud, lxbarth, mapbox-admin, mateov, miccolis, mikemorris, morganherlocker, mourner, nickidlugash, rclark, samanbb, sgillies, springmeyer, themarex, tmcw, tristen, willwhite, yhahn |
| Keywords | csv, geocsv, buffer |

## Links

- npm: https://www.npmjs.com/package/detect-geocsv
- Repository: https://github.com/mapbox/detect-geocsv
- Homepage: https://github.com/mapbox/detect-geocsv#readme
- Issues: https://github.com/mapbox/detect-geocsv/issues
- npm.io page: https://npm.io/package/detect-geocsv

## Alternatives

- [csv-to-markdown-table](https://npm.io/package/csv-to-markdown-table.md) — 47.0K weekly downloads
- [@sapphire/ratelimits](https://npm.io/package/@sapphire/ratelimits.md) — 4.4K weekly downloads
- [js-csvparser](https://npm.io/package/js-csvparser.md) — 2.0K weekly downloads
- [@adadapted/js-sdk](https://npm.io/package/@adadapted/js-sdk.md) — 251 weekly downloads
- [@grapecity/spread-sheets-sparklines](https://npm.io/package/@grapecity/spread-sheets-sparklines.md) — 103 weekly downloads

## Recent versions

- 0.1.0 (latest) — 2016-08-04
- 0.0.3 — 2015-12-04
- 0.0.2 — 2015-11-18
- 0.0.1 — 2015-05-21

## README

# detect-geocsv

Node module that returns if a buffer has geocsv headers.

Version format follows [Semantic Version](http://semver.org/)

[![Build Status](https://travis-ci.org/mapbox/detect-geocsv.svg?branch=master)](https://travis-ci.org/mapbox/detect-geocsv)

## Install

With npm:

    npm install -g detect-geocsv

## API

### detectGeoCSV

Determine whether an input is a CSV file that could be
put on a map: that it has geographical information
that amounts to points or geography.

**Parameters**

-   `buf` **string or Buffer** input, an upload that could be any format

**Examples**

```javascript
var detect = require('detect-geocsv');
var buffer = fs.readFileSync('path/to/data/file.csv');
var isgeocsv = detect(buffer);
assert.ok(isgeocsv);
```

Returns **boolean** whether the content is or is not geographic

## CLI Usage

```sh
$ detect-geocsv file.csv
# echoes either true or false
```

## Tests

`npm test`

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