UNPKG

258 BJavaScriptView Raw
1/**
2 * Convert Map, Set to Array
3 */
4export function convertToArray(val) {
5 if (val instanceof Map) {
6 return Array.from(val.values());
7 }
8 return Array.isArray(val) ? val : Array.from(val);
9}
10//# sourceMappingURL=convert-to-array.util.js.map
\No newline at end of file