.promise()

Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

jQuery.grep()

Finds the elements of an array which satisfy a filter function. The original array is not affected.