compact.js 223 B

123456789
  1. // Inspired by: http://documentcloud.github.com/underscore/#compact
  2. 'use strict';
  3. var filter = Array.prototype.filter;
  4. module.exports = function () {
  5. return filter.call(this, function (val) { return val != null; });
  6. };