export type OptionalArray = T | Array; /** * Returns an array of the input. If the input already is an array, return the input. * @type {T} The type of the array values. * @param {T} input The input either as value or as array. * @returns {Array} The input value as array. */ export const arrayify = (input: OptionalArray) => { return Array.isArray(input) ? input : [input]; };