function merge(
  primary: Animation,
  secondary: Animation
) : Animation {
  // A map used to track the normalized frame value in cases where
  // two animations contain frames that appear closely, but not exactly
  // at the same time (e.g., 50% and 52%)
  const normalizedFrames: FrameMap = {};

  // We merge each frame into a new object and return it
  const merged: Animation = {};

  const normalizedPrimary: Animation = normalizeFrames(
    primary,
    normalizedFrames
  );

  const normalizedSecondary: Animation = normalizeFrames(
    secondary,
    normalizedFrames
  );

  // Iterate all normalized frames
  for (const frame in normalizedFrames) {
    const primaryFrame = normalizedPrimary[frame];
    const secondaryFrame = normalizedSecondary[frame];
    // Create a new frame object if it doesn't exist.
    const target = merged[frame] || (merged[frame] = {});

    // If both aniatmions define this frame, merge them carefully
    if (primaryFrame && secondaryFrame) {
      mergeFrames(primaryFrame, secondaryFrame, target);
    } else {
      // Otherwise find the defined frime and populate all properties\
      // except for "transform" when the value is none.
      const keyframe = populateDefinedFrame(
        primaryFrame,
        secondaryFrame
      );
      if (keyframe) {
        merged[frame] = keyframe;
      }
    }
  }
  return merged;
}
Merge lets you take two Animations and merge them together. It
iterates through each animation and merges each keyframe. It
special cases the `transform` property and uses string interop.
to merge the two transforms.

This is *at your own risk* and will not work with animations
that are clearly opposites (fadeIn and fadeOut).

@param {Object} primary Animation
@param {Object} secondary Animation
@returns {Object} merged Animation
@example
import { merge, tada, flip } from 'react-animations';
const tadaFlip = merge(tada, flip);