guessformat
Makes a guess at the format of a string of JS code and gives formatting options found.
Right now it supports:
- semicolons
- indent style
- quote style
The output is meant to be used for tools such as escodegen
Example
var guess = var fs = var code = fs console/* { indent: ' ', semicolons: false, quotes: 'double' }*/
API
guess(jsString[, maxLines])
Scan up to the first maxLines (default=100) lines of the jsString to observe the formatting options used.
Right now it supports:
- semicolons
- indent style
- quote style
LICENSE
MIT