UNPKG

typeit

Version:

The most versatile animated typing utility on the planet.

7 lines (5 loc) 194 B
import { El } from "../types"; import select from "./select"; export default function (thing: string | El): El { return typeof thing === "string" ? (select(thing as string) as El) : thing; }