arrays.mjs 318 B

123456789101112
  1. export { castArray as ensureArray } from 'lodash-unified';
  2. import { isArray } from '@vue/shared';
  3. const unique = (arr) => [...new Set(arr)];
  4. const castArray = (arr) => {
  5. if (!arr && arr !== 0)
  6. return [];
  7. return isArray(arr) ? arr : [arr];
  8. };
  9. export { castArray, unique };
  10. //# sourceMappingURL=arrays.mjs.map