UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

8 lines 228 B
import { isNonNullable } from '@rc-component/util'; const toList = (val, config = {}) => { if (!isNonNullable(val) && config?.skipEmpty) { return []; } return Array.isArray(val) ? val : [val]; }; export default toList;