• Filter objects to keep only the one that fullfil the predicate

    Objects that do not fullfil the predicate are removed from objects lists.

    Parameters

    • predicate: Function

      The function applied to each object: must return true if the object fulfill the predicate.

    • objectsLists: ObjectsLists

      The lists of objects to trim

    • negatePredicate: boolean

      If set to true, the result of the predicate is negated.

    • extraArg: any

      Argument passed to the predicate (along with the object). Useful for avoiding relying on temporary closures.

    Returns boolean

    true if at least one object fulfill the predicate.