src/stage-impl.js
function defineGetStageValue(parts) {
  let body;
  switch (parts.length) {
    case 0:
      body = "return this.state;";
      break;

    default:
      const lastIndex = parts.length - 1;
      body = "var tmp0 = this.state;";
      for (let i = 0; i < lastIndex; ++i) {
        body += `
if (tmp${i} == null) {
  return undefined;
}
var tmp${i + 1} = tmp${i}.${parts[i]};`;
      }
      body += `
return tmp${lastIndex} && tmp${lastIndex}.${parts[lastIndex]};`;
      break;
  }

  return Function(body);
}
function defineGetStageValue(parts) {
  let body;
  switch (parts.length) {
    case 0:
      body = "return this.state;";
      break;

    default:
      const lastIndex = parts.length - 1;
      body = "var tmp0 = this.state;";
      for (let i = 0; i < lastIndex; ++i) {
        body += `
if (tmp${i} == null) {
  return undefined;
}
var tmp${i + 1} = tmp${i}.${parts[i]};`;
      }
      body += `
return tmp${lastIndex} && tmp${lastIndex}.${parts[lastIndex]};`;
      break;
  }

  return Function(body);
}
function defineGetStageValue ( parts ) { let body ; switch ( parts . length ) { case 0 : body = "return this.state;" ; break ; default : const lastIndex = parts . length - 1 ; body = "var tmp0 = this.state;" ; for ( let i = 0 ; i < lastIndex ; ++ i ) { body += ` ${ i } ${ i + 1 } ${ i } ${ parts [ i ] } ` ; } body += ` ${ lastIndex } ${ lastIndex } ${ parts [ lastIndex ] } ` ; break ; } return Function ( body ) ; }
------------------------------------------------------------------------------
------------------------------------------------------------------------------