Scan through a list of objects, removing those which match a predicate. Similar to jQuery.grep, only acts on the list in-place by removal, rather than by creating a new list by inclusion.
||(Array or Object) The list of objects to be scanned over.|
||(Type) A predicate function determining whether an element should be removed. This accepts the standard signature (object, index) and returns a "truthy" result to indicate that the supplied object should be removed from the list.|
|(Array or Object)|| The
In this example, each object in a list of permission objects is examined using a function called
permManager.resolve(). If this function fails to resolve the item, it will be removed from the list.