7 lines
155 B
JavaScript
Raw Permalink Normal View History

2025-04-23 09:34:08 +08:00
import filter from './filter.js';
// Trim out all falsy values from an array.
export default function compact(array) {
return filter(array, Boolean);
}