code: function getDirection(
    str: string,
    strongFallback: ?BidiDirection,
  ): BidiDirection {
    if (!strongFallback) {
      strongFallback = UnicodeBidiDirection.getGlobalDir();
    }
    invariant(
      UnicodeBidiDirection.isStrong(strongFallback),
      'Fallback direction must be a strong direction',
    );
    return resolveBlockDir(str, strongFallback);
  }
docs: Returns the direction of a block of text, based on the direction of its
  first strong character (has Bidi_Class value of L, R, or AL), or a fallback
  direction, if no strong character is found.
  
  NOTE: This function is similar to resolveBlockDir(), but uses the global
  direction as the fallback, so it *always* returns a Strong direction,
  making it useful for integration in places that you need to make the final
  decision, like setting some CSS class.
  
  This function is supposed to be used in respect to Higher-Level Protocol
  rule HL1. (http://www.unicode.org/reports/tr9/#HL1)
  
  @param str             A text block; e.g. paragraph, table cell
  @param strongFallback  Fallback direction, used if no strong direction
  detected for the block (default = global direction)
  @return                The resolved Strong direction