# detect-json-indent

> detect the indentation of stringified json

Latest version **0.0.3** (published 2018-04-26) · BSD-2-Clause license · 0 weekly downloads

## Install

```sh
npm install detect-json-indent
pnpm add detect-json-indent
yarn add detect-json-indent
bun add detect-json-indent
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2018-04-26 |
| First published | 2013-08-12 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mapbox |
| Maintainers | alulsh, mapbox-admin, oliikit, zmully |
| Keywords | json, indent, space, tab |

## Links

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

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

- 0.0.3 (latest) — 2018-04-26
- 0.0.2 — 2018-04-26
- 0.0.1 — 2017-03-03
- 0.0.0 — 2013-08-12

## README

[![Build Status](https://travis-ci.org/tmcw/detect-json-indent.png)](https://travis-ci.org/tmcw/detect-json-indent)

## detect JSON indent

```js
detect(JSON.stringify(data, null, 4)) // '    '
detect(JSON.stringify(data, null, '\t')) // '\t'
detect(JSON.stringify(data, null, 2)) // '  '
detect(JSON.stringify(data)) // null
```

### api

```js
var detect = require('detect-json-indent');
var indentString = detect(jsonString);
```

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