capturing.js
function replaceClassDecls(parsed, options) {

  if (options.classToFunction)
    return classToFunctionTransform(parsed, options.classToFunction);

  var topLevel = topLevelDeclsAndRefs(parsed);
  if (!topLevel.classDecls.length) return parsed;

  for (var i = parsed.body.length - 1; i >= 0; i--) {
    var stmt = parsed.body[i];
    if (stmt.id && topLevel.classDecls.includes(stmt))
      parsed.body.splice(i+1, 0, assignExpr(options.captureObj, stmt.id, stmt.id, false));
  }
  return parsed;
}
function replaceClassDecls(parsed, options) {

  if (options.classToFunction)
    return classToFunctionTransform(parsed, options.classToFunction);

  var topLevel = topLevelDeclsAndRefs(parsed);
  if (!topLevel.classDecls.length) return parsed;

  for (var i = parsed.body.length - 1; i >= 0; i--) {
    var stmt = parsed.body[i];
    if (stmt.id && topLevel.classDecls.includes(stmt))
      parsed.body.splice(i+1, 0, assignExpr(options.captureObj, stmt.id, stmt.id, false));
  }
  return parsed;
}
function replaceClassDecls ( parsed , options ) { if ( options . classToFunction ) return classToFunctionTransform ( parsed , options . classToFunction ) ; var topLevel = topLevelDeclsAndRefs ( parsed ) ; if ( ! topLevel . classDecls . length ) return parsed ; for ( var i = parsed . body . length - 1 ; i >= 0 ; i -- ) { var stmt = parsed . body [ i ] ; if ( stmt . id && topLevel . classDecls . includes ( stmt ) ) parsed . body . splice ( i + 1 , 0 , assignExpr ( options . captureObj , stmt . id , stmt . id , false ) ) ; } return parsed ; }
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- capturing specific code -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - capturing specific code - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = - = -