(paths, id)
| 68 | } |
| 69 | |
| 70 | export function getPath(paths, id) { |
| 71 | if (typeof id === 'object') { |
| 72 | const keys = Object.keys(id).sort(); |
| 73 | const keyStr = keys.join(','); |
| 74 | const keyPaths = paths.objs[keyStr]; |
| 75 | if (!keyPaths) { |
| 76 | return false; |
| 77 | } |
| 78 | const values = props(keys, id); |
| 79 | const pathObj = find(propEq(values, 'values'), keyPaths); |
| 80 | return pathObj && pathObj.path; |
| 81 | } |
| 82 | return paths.strs[id]; |
| 83 | } |
no test coverage detected
searching dependent graphs…