detect json indent levels
JavaScript
Switch branches/tags
Nothing to show
Latest commit 491b5f8 Mar 3, 2017 @tmcw tmcw 0.0.1
Permalink
Failed to load latest commit information.
test First Aug 12, 2013
.travis.yml First Aug 12, 2013
LICENSE Create LICENSE Feb 11, 2017
README.md status image Aug 12, 2013
index.js Update dependencies, remove unused def parameter Mar 3, 2017
package.json 0.0.1 Mar 3, 2017

README.md

Build Status

detect JSON indent

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

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