Babel plugin immutable const
Transform consted objects into immutable objects.
The object will be frozen. This will avoid future mutations on it. Update will simply be ignored and no errors will be thrown.
Installation
npm install --save-dev babel-plugin-immutable-const
Usage
Add the following line to your .babelrc file:
Example
const foo = bar: true ;
Will be transformed into:
const foo = Object;