toArray.tsx 96 B

123
  1. export default function toArray<T>(val: T | T[]) {
  2. return Array.isArray(val) ? val : [val];
  3. }