ComfyUI Node
_.indexOf
Returns the index at which value can be found in the array, or -1 if value is not present in the array. If you're working with a large array, and you know that the array is already sorted, pass true for isSorted to use a faster binary search ... or, pass a number as the third argument in order to look for the first matching value in the array after the given index. If isSorted is true, this function uses operator (note).
_.indexOf
- py_list
- value
- INT
◄isSortedfalse►
Categoryovum/underscore
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| py_listopt | * | Primary input object (expected array). You can still pass any JSON-serializable value. Also accepts _.CHAIN to continue chaining. | |
| valueopt | * | value: JSON allowed for arrays/objects where applicable. | |
| isSortedopt | BOOLEAN | false | isSorted (boolean) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |