7 lines
155 B
JavaScript
Raw Permalink Normal View History

2024-10-15 23:05:53 +03:00
import filter from './filter.js';
// Trim out all falsy values from an array.
export default function compact(array) {
return filter(array, Boolean);
}