UNPKG

@bemedev/basifun

Version:
19 lines (16 loc) 372 B
import { isDefined } from '../types/isDefined.js'; import { isArray } from './isArray.js'; const toArray = obj => { if (isArray(obj)) { return obj; } else { const check = isDefined(obj); if (!check) return []; return [obj]; } }; toArray.typed = toArray; export { toArray }; //# sourceMappingURL=toArray.js.map