(node)
| 1 | // getId expects the image reference node to be the sole node in a paragraph |
| 2 | function getId(node) { |
| 3 | const { type, name, attributes } = node; |
| 4 | if (type !== 'leafDirective' || name !== 'id' || !attributes) return null; |
| 5 | return attributes.id; |
| 6 | } |
| 7 | |
| 8 | module.exports = getId; |
no outgoing calls
no test coverage detected