Add variable declarations for implicit global variable assignments.
# via yarn$ yarn add add-variable-declarations# via npm$ npm install add-variable-declarations
;const source = `PI = 3.14;radius = 8;circumference = 2 * PI * radius;`;console;// var PI = 3.14;// var radius = 8;// var circumference = 2 * PI * radius;
- Clone the repository.
- Install dependencies.
- Make edits and re-build.
yarn run build
- Or, to watch and build files as you edit.
yarn run build -- --watch
- Run tests to ensure everything works.
var? Shouldn't this use
Yes, but not all situations allow the use of
const, such as when
the variable binding takes advantage of
If you want
const you can use this library in combination with
esnext which will turn all eligible
const as appropriate.