<commit_before># add-variable-declarations

Add variable declarations for implicit global variable assignments.

## Install

```
$ npm install [--save-dev] add-variable-declarations
```

## Usage

```js
import addVariableDeclarations from 'add-variable-declarations';

const source = `
PI = 3.14;
radius = 8;
circumference = 2 * PI * radius;
`;

console.log(addVariableDeclarations(source).code);
// var PI = 3.14;
// var radius = 8;
// var circumference = 2 * PI * radius;
```

## Why?

This project is used by [decaffeinate][decaffeinate] to add variable
declarations to converted CoffeeScript code. This project is not intended to
allow you to write JavaScript without variable declarations, as I consider that
a bad practice for the same reasons it's a bad practice in CoffeeScript.

[decaffeinate]: https://github.com/eventualbuddha/decaffeinate

## License

MIT<commit_msg>Correct the URL to decaffeinate.<commit_after># add-variable-declarations

Add variable declarations for implicit global variable assignments.

## Install

```
$ npm install [--save-dev] add-variable-declarations
```

## Usage

```js
import addVariableDeclarations from 'add-variable-declarations';

const source = `
PI = 3.14;
radius = 8;
circumference = 2 * PI * radius;
`;

console.log(addVariableDeclarations(source).code);
// var PI = 3.14;
// var radius = 8;
// var circumference = 2 * PI * radius;
```

## Why?

This project is used by [decaffeinate][decaffeinate] to add variable
declarations to converted CoffeeScript code. This project is not intended to
allow you to write JavaScript without variable declarations, as I consider that
a bad practice for the same reasons it's a bad practice in CoffeeScript.

[decaffeinate]: https://github.com/decaffeinate/decaffeinate

## License

MIT
{'fraction_non_alphanumeric': 0.10535211267605633, 'fraction_numerical': 0.011267605633802818, 'mean_word_length': 4.620253164556962, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '2904408', 'n_tokens_mistral': 552, 'n_tokens_neox': 512, 'n_words': 189}