UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

7 lines 226 B
const toList = (candidate, skipEmpty = false) => { if (skipEmpty && (candidate === undefined || candidate === null)) { return []; } return Array.isArray(candidate) ? candidate : [candidate]; }; export default toList;