(obj: any, prop: string, appliesTo, stream: fs.WriteStream)
| 1 | import * as fs from 'fs'; |
| 2 | |
| 3 | function handleObject(obj: any, prop: string, appliesTo, stream: fs.WriteStream) { |
| 4 | const keys = Object.keys(obj).sort(); |
| 5 | for (const key of keys) { |
| 6 | const child = obj[key]; |
| 7 | const chProp = prop + '<br>.' + key; |
| 8 | const chType = getType(child); |
| 9 | stream.write(`| ${chProp} | ${chType} | ${appliesTo} | ${child.description} |\n`); |
| 10 | if (child.properties) { |
| 11 | handleObject(child.properties, chProp, appliesTo, stream); |
| 12 | } |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | function getType(obj: any) { |
| 17 | const pipe = ' | '; |
no test coverage detected