function createStringXY(fractionDigits) {
  return (
    /**
     * @param {Coordinate} coordinate Coordinate.
     * @return {string} String XY.
     */
    function (coordinate) {
      return toStringXY(coordinate, fractionDigits);
    }
  );
}
Returns a {@link module:ol/coordinate~CoordinateFormat} function that can be
used to format
a {Coordinate} to a string.

Example without specifying the fractional digits:

    import {createStringXY} from 'ol/coordinate.js';

    const coord = [7.85, 47.983333];
    const stringifyFunc = createStringXY();
    const out = stringifyFunc(coord);
    // out is now '8, 48'

Example with explicitly specifying 2 fractional digits:

    import {createStringXY} from 'ol/coordinate.js';

    const coord = [7.85, 47.983333];
    const stringifyFunc = createStringXY(2);
    const out = stringifyFunc(coord);
    // out is now '7.85, 47.98'

@param {number} [fractionDigits] The number of digits to include
   after the decimal point. Default is `0`.
@return {CoordinateFormat} Coordinate format.
@api