How to use the @babel/plugin-transform-parameters.convertFunctionParams function in @babel/plugin-transform-parameters

To help you get started, we’ve selected a few @babel/plugin-transform-parameters examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maxdenaro / maxgraph-youtube-source / JS-плагины №7. Новое подключение swiper.js через npm / node_modules / @babel / plugin-proposal-object-rest-spread / lib / index.js View on Github external
}
          }
        }

        if (!idInRest) {
          for (let i = 0; i < params.length; ++i) {
            const param = params[i];

            if (paramsWithRestElement.has(i)) {
              replaceRestElement(param.parentPath, param);
            }
          }
        } else {
          const shouldTransformParam = idx => idx >= i - 1 || paramsWithRestElement.has(idx);

          (0, _pluginTransformParameters.convertFunctionParams)(path, loose, shouldTransformParam, replaceRestElement);
        }
      },

@babel/plugin-transform-parameters

Compile ES2015 default and rest parameters to ES5

MIT
Latest version published 17 days ago

Package Health Score

95 / 100
Full package analysis