Sha256: 925e3f8702ddeceffb82b05d586dd57579e88fca5203b649c0a6ff1cb0fce91f
Contents?: true
Size: 187 Bytes
Versions: 10
Compression:
Stored size: 187 Bytes
Contents
export default function ensureArray<T>(thing: Array<T> | T | undefined | null): Array<T> { if (Array.isArray(thing)) return thing; if (thing == undefined) return []; return [thing]; }
Version data entries
10 entries across 10 versions & 1 rubygems