• Filters the array

    Example

    where([1, 2, 2, 3, 4, 4, 5], 4); // [4,4]
    

    Type Parameters

    • T

    Parameters

    • arr: T[]
    • value: unknown

    Returns T[]

  • Filters the array

    Example

    where([{count:1}, {count:20}, {count:15}], "count", 15); // [{count:15}]
    

    Type Parameters

    • T

    Parameters

    • arr: T[]
    • field: string
    • value: unknown

    Returns T[]

  • Filters the array

    Example

    where([1, 2, 2, 3, 4, 4, 5], "<", 4); // [1,2,2,3]
    

    Type Parameters

    • T

    Parameters

    Returns T[]

  • Filters the array

    Example

    where([{count:1}, {count:20}, {count:15}], "count", ">=", 15); // [{count:20},{count:15}]
    

    Type Parameters

    • T

    Parameters

    • arr: T[]
    • field: string
    • operator: OperatorT
    • value: unknown

    Returns T[]

Generated using TypeDoc