ladder

ladder =====

npm install ladder
42 downloads in the last day
555 downloads in the last week
2 576 downloads in the last month

ladder

A library to detect JSON indentation

Install

$ npm install ladder

Tests

$ npm test

Methods

ladder(jsonString)

jsonString is a valid json string. It returns either the number of spaces or '\t' if tabs are used

Examples

test.json

{
  "test": "hellow"
}

example.js

var ladder = require('ladder'),
    fs     = require('fs'),
    path   = require('path');

fs.readFile(path.resolve('./test.json'), function(e, data) {
  console.log(ladder(data.toString())); // => 2
});

License

MIT

npm loves you