@babel/plugin-syntax-nullish-coalescing-operator
Allow parsing of the nullish-coalescing operator.
Installation
npm install --save-dev @babel/plugin-syntax-nullish-coalescing-operator
Usage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["@babel/plugin-syntax-nullish-coalescing-operator"]
}
Via CLI
babel --plugins @babel/plugin-syntax-nullish-coalescing-operator script.js
Via Node API
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-syntax-nullish-coalescing-operator"]
});