(arr, fn, returnIndex, byValueOnly)
| 13 | } |
| 14 | |
| 15 | export function findWhere(arr, fn, returnIndex, byValueOnly) { |
| 16 | let i = arr.length; |
| 17 | while (i--) if (typeof fn==='function' && !byValueOnly ? fn(arr[i]) : arr[i]===fn) break; |
| 18 | return returnIndex ? i : arr[i]; |
| 19 | } |
| 20 | |
| 21 | export function createAttributeFilter(ns, name) { |
| 22 | return o => o.ns===ns && toLower(o.name)===toLower(name); |
no test coverage detected
searching dependent graphs…