Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 433 Bytes

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);
Something went wrong with that request. Please try again.