How to use babel-helper-call-delegate - 1 common examples

To help you get started, we’ve selected a few babel-helper-call-delegate 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 babel / babel / packages / babel-plugin-transform-es2015-parameters / src / default.js View on Github external
// add declarations for trailing parameters
    for (let i = lastNonDefaultParam + 1; i < node.params.length; i++) {
      let param = node.params[i];
      if (param._isDefaultPlaceholder) continue;

      let declar = buildCutOff(param, argsIdentifier, t.numericLiteral(i));
      declar._blockHoist = node.params.length - i;

    // we need to cut off all trailing parameters
    node.params = node.params.slice(0, lastNonDefaultParam);

    if (state.iife) {
      body.push(callDelegate(path, scope));
      path.set("body", t.blockStatement(body));
    } else {
      path.get("body").unshiftContainer("body", body);


Helper function to call delegate

Latest version published 7 years ago

Package Health Score

82 / 100
Full package analysis

Popular babel-helper-call-delegate functions

Similar packages