☰
Debian Codegraph
@
5.0.2~ds+~2.8.2-2
5.0.2~ds+~2.8.2-1
/
/
legacy
/
src
/
utils
/
ensureArray.ts
☽
☼
legacy/src/utils/ensureArray.ts
code
plain
raw
Expat
2019 RollupJS Plugin Contributors <https://github.com/rollup/plugins/graphs/contributors>
debian/copyright
1
export default function ensureArray<T>(thing: Array<T> | T | undefined | null): Array<T> {
2
if (Array.isArray(thing)) return thing;
3
if (thing == undefined) return [];
4
return [thing];
5
}