(node: Node, config: Config = {})
| 69 | }, |
| 70 | |
| 71 | node(node: Node, config: Config = {}) { |
| 72 | const schema = this.findSchema(node, config) ?? {}; |
| 73 | if (schema && schema.transform instanceof Function) |
| 74 | return schema.transform(node, config); |
| 75 | |
| 76 | const children = this.children(node, config); |
| 77 | if (!schema || !schema.render) return children; |
| 78 | |
| 79 | const attributes = this.attributes(node, config); |
| 80 | |
| 81 | if (isPromise(attributes) || isPromise(children)) { |
| 82 | return Promise.all([attributes, children]).then( |
| 83 | (values) => new Tag(schema.render, ...values) |
| 84 | ); |
| 85 | } |
| 86 | |
| 87 | return new Tag(schema.render, attributes, children); |
| 88 | }, |
| 89 | } as Transformer; |
nothing calls this directly
no test coverage detected
searching dependent graphs…