* Set up the virtual file. * * @param {Readonly } options * Props. * @returns {VFile} * Result.
(options)
| 284 | * Result. |
| 285 | */ |
| 286 | function createFile(options) { |
| 287 | const children = options.children || '' |
| 288 | const file = new VFile() |
| 289 | |
| 290 | if (typeof children === 'string') { |
| 291 | file.value = children |
| 292 | } else { |
| 293 | unreachable( |
| 294 | 'Unexpected value `' + |
| 295 | children + |
| 296 | '` for `children` prop, expected `string`' |
| 297 | ) |
| 298 | } |
| 299 | |
| 300 | return file |
| 301 | } |
| 302 | |
| 303 | /** |
| 304 | * Process the result from unified some more. |
no outgoing calls
no test coverage detected
searching dependent graphs…