function containsExtent(extent1, extent2) {
  return (
    extent1[0] <= extent2[0] &&
    extent2[2] <= extent1[2] &&
    extent1[1] <= extent2[1] &&
    extent2[3] <= extent1[3]
  );
}
Check if one extent contains another.

An extent is deemed contained if it lies completely within the other extent,
including if they share one or more edges.

@param {Extent} extent1 Extent 1.
@param {Extent} extent2 Extent 2.
@return {boolean} The second extent is contained by or on the edge of the
    first.
@api