0.1.1 • Published 4 years ago

babel-replace-variable-init v0.1.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

babel-replace-variable-init NPM Version

Generate a babel plugin which replaces variable initializations

Usage

import babelReplaceVariableInit from 'babel-replace-variable-init';

export default babelReplaceVariable({
	variableName: ({types: t}) => t.stringLiteral('')
});

This will create a babel plugin which will replace the initialization of any variableName variable with an empty string.