* Mimics the `find` method of Array * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1
(arr, check)
| 3807 | |
| 3808 | |
| 3809 | function find(arr, check) { |
| 3810 | // use native find if supported |
| 3811 | if (Array.prototype.find) { |
| 3812 | return arr.find(check); |
| 3813 | } // use `filter` to obtain the same behavior of `find` |
| 3814 | |
| 3815 | |
| 3816 | return arr.filter(check)[0]; |
| 3817 | } |
| 3818 | /** |
| 3819 | * Return the index of the matching object |
| 3820 | * @method |
no outgoing calls
no test coverage detected
searching dependent graphs…