• Predicate utility for checking if one of many predicates return 200 or 201

    • If 1+ predicates return 200 or 201, return the first predicate value in the args that has 200/201
    • Else, convert any predicates returning a error http code into an NBError with a default message and that httpCode
    • Then, throw a new NBError with code multiple_failed_predicates with details that is an array of the thrown errors and httpCode of the lowest code
    • Can pass null to skip that predicate

    Parameters

    • Rest ...args: (null | Predicate)[]

      variable args array of predicate functions or null

    Returns Predicate

    • predicate function that return 200 if any of the predicate return 200 blocks-1339

Generated using TypeDoc