(value)
| 135 | } |
| 136 | |
| 137 | function listify(value) { |
| 138 | if (Array.isArray(value)) return value; |
| 139 | if (!value || typeof value !== "object") return []; |
| 140 | for (const key of ["list", "data", "records", "items", "rows"]) { |
| 141 | if (Array.isArray(value[key])) return value[key]; |
| 142 | } |
| 143 | return []; |
| 144 | } |
| 145 | |
| 146 | function pickId(item = {}) { |
| 147 | for (const key of ["id", "sorghum_id", "sorghumId", "member_sorghum_id", "memberSorghumId", "land_id", "landId"]) { |
no outgoing calls
no test coverage detected