How to use the babel-traverse.copyCache function in babel-traverse

To help you get started, we’ve selected a few babel-traverse 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 mathieuancelin / js-repaint-perfs / motorcycle / node_modules / babel-types / lib / index.js View on Github external
}

  // force inherit "private" properties
  for (var key in parent) {
    if (key[0] === "_") child[key] = parent[key];
  }

  // force inherit select properties
  var _arr4 = t.INHERIT_KEYS.force;
  for (var _i6 = 0; _i6 < _arr4.length; _i6++) {
    var key = _arr4[_i6];
    child[key] = parent[key];
  }

  t.inheritsComments(child, parent);
  traverse.copyCache(parent, child);

  return child;
}