* Resolves a UID to its value in the $objects array
(objects: unknown[], uid: BplistUID | unknown)
| 53 | * Resolves a UID to its value in the $objects array |
| 54 | */ |
| 55 | function resolveUID(objects: unknown[], uid: BplistUID | unknown): unknown { |
| 56 | if (!isUID(uid)) return uid; |
| 57 | const index = uid.UID; |
| 58 | if (index < 0 || index >= objects.length) return undefined; |
| 59 | return objects[index]; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Finds the index of a string in the $objects array |
no test coverage detected