(opf)
| 593 | const isUUID = /([0-9a-f]{8})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{4})-([0-9a-f]{12})/; |
| 594 | |
| 595 | const getUUID = (opf) => { |
| 596 | for (const el of opf.getElementsByTagNameNS(NS.DC, "identifier")) { |
| 597 | const [id] = getElementText(el).split(":").slice(-1); |
| 598 | if (isUUID.test(id)) return id; |
| 599 | } |
| 600 | return ""; |
| 601 | }; |
| 602 | |
| 603 | const getIdentifier = (opf) => |
| 604 | getElementText( |
no test coverage detected