lib/plugins/js/babel-plugin-transform-flatten.js
function getDeclarationParent(path) {
  do {
    if (
      path.isFunctionDeclaration() ||
      path.isVariableDeclaration() ||
      path.isClassDeclaration() ||
      path.isAssignmentExpression()
    ) {
      return path;
    }
  } while ((path = path.parentPath));
}
function getDeclarationParent(path) {
  do {
    if (
      path.isFunctionDeclaration() ||
      path.isVariableDeclaration() ||
      path.isClassDeclaration() ||
      path.isAssignmentExpression()
    ) {
      return path;
    }
  } while ((path = path.parentPath));
}
function getDeclarationParent ( path ) { do { if ( path . isFunctionDeclaration ( ) || path . isVariableDeclaration ( ) || path . isClassDeclaration ( ) || path . isAssignmentExpression ( ) ) { return path ; } } while ( ( path = path . parentPath ) ) ; }
Retrieve declaration parent for 'path'
@param {NodePath} path
@returns {NodePath}
Retrieve declaration parent for path