Skip to content
Browse files

Add _.compact function.

  • Loading branch information...
1 parent 499c1e0 commit 274ae7a341f772bbc8f566feb95f1bca12aea696 @BrentWheeldon BrentWheeldon committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 dist/typeahead.jquery.js
View
3 dist/typeahead.jquery.js
@@ -38,6 +38,9 @@
},
map: $.map,
filter: $.grep,
+ compact: function(array) {
+ return array.filter(function(o) { return !!o; });
+ },
every: function(obj, test) {
var result = true;
if (!obj) {

0 comments on commit 274ae7a

Please sign in to comment.
Something went wrong with that request. Please try again.