avocado-old/packages/core/array.js

8 lines
193 B
JavaScript
Raw Normal View History

2019-10-03 16:39:27 -05:00
export function arrayUnique(array) {
return Array.from((new Set(array)).values());
}
export function flatten(array) {
return array.reduce((flattened, elm) => flattened.concat(elm), []);
}