UNPKG

typeit

Version:

The most versatile animated typing utility on the planet.

10 lines (7 loc) 269 B
import { El } from "../types"; let getAnimationFromElement = (element: El): Animation | undefined => { return element?.getAnimations().find((animation) => { return animation.id === element.dataset.tiAnimationId; }); }; export default getAnimationFromElement;