compact.js 170 B

12345678
  1. var filter = require('./filter.js');
  2. // Trim out all falsy values from an array.
  3. function compact(array) {
  4. return filter(array, Boolean);
  5. }
  6. module.exports = compact;