function transform(coordinate, source, destination) {
  const transformFunc = getTransform(source, destination);
  if (!transformFunc) {
    const sourceCode = get(source).getCode();
    const destinationCode = get(destination).getCode();
    throw new Error(
      `No transform available between ${sourceCode} and ${destinationCode}`,
    );
  }
  return transformFunc(coordinate, undefined, coordinate.length);
}
Transforms a coordinate from source projection to destination projection.
This returns a new coordinate (and does not modify the original). If there
is no available transform between the two projection, the function will throw
an error.

See {@link module:ol/proj.transformExtent} for extent transformation.
See the transform method of {@link module:ol/geom/Geometry~Geometry} and its
subclasses for geometry transforms.

@param {import("./coordinate.js").Coordinate} coordinate Coordinate.
@param {ProjectionLike} source Source projection-like.
@param {ProjectionLike} destination Destination projection-like.
@return {import("./coordinate.js").Coordinate} Coordinate.
@api