babel-plugin-undefined-is-always-a-function
v1.0.0
Published
Make sure that undefined is a always a funcion.
Downloads
1
Readme
babel-plugin-undefined-is-always-a-function
In case undefined-is-a-function is not thorough enough for your use case, this Babel plugin will ensure that undefined is a function in all of your modules.
Example
function isUndefined(value) {
return value === undefined;
}
Becomes much better:
function undefined() {
return undefined;
}
function isUndefined(value) {
return value === undefined;
}
Installation
$ npm install babel-plugin-undefined-is-always-a-function
Usage
.babelrc
{
"plugins": ["undefined-is-always-a-function"]
}
webpack.config.js
loaders: [
{
test: /\.jsx?$/,
loader: 'babel',
plugins: []
options: {
plugins: [
require('babel-plugin-undefined-is-always-a-function'),
]
}
}
]