UNPKG

sanity

Version:

Sanity is a real-time content infrastructure with a scalable, hosted backend featuring a Graph Oriented Query Language (GROQ), asset pipelines and fast edge caches

8 lines (6 loc) 135 B
export function arrayify<T>(val: Array<T> | T): Array<T> { if (Array.isArray(val)) { return val } return val ? [val] : [] }