<commit_before>guessformat
=====

[![NPM](https://nodei.co/npm/guessformat.png)](https://nodei.co/npm/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](http://npm.im/escodegen)

Example
---

```javascript
var guess = require("guessformat")

var fs = require("fs")
var code = fs.readFileSync("./node_modules/guessformat/guessformat.js").toString()

console.log(guess(code))
/*
  { indent: '  ', semicolons: false, quotes: 'double' }
*/
```

API
===

`guess(jsString[, maxLines])`
---

Guess 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<commit_msg>README grammar fix<commit_after>guessformat
=====

[![NPM](https://nodei.co/npm/guessformat.png)](https://nodei.co/npm/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](http://npm.im/escodegen)

Example
---

```javascript
var guess = require("guessformat")

var fs = require("fs")
var code = fs.readFileSync("./node_modules/guessformat/guessformat.js").toString()

console.log(guess(code))
/*
  { 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
{'fraction_non_alphanumeric': 0.14213197969543148, 'fraction_numerical': 0.00338409475465313, 'mean_word_length': 4.127167630057803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '36683', 'n_tokens_mistral': 607, 'n_tokens_neox': 581, 'n_words': 178}