( propertySubject: string, value: JSONValue, store: Store, )
| 64 | } |
| 65 | |
| 66 | async function propertyLine( |
| 67 | propertySubject: string, |
| 68 | value: JSONValue, |
| 69 | store: Store, |
| 70 | ): Promise<string> { |
| 71 | const property = await store.getProperty(propertySubject); |
| 72 | let valString = value.toString(); |
| 73 | switch (property.datatype) { |
| 74 | case Datatype.ATOMIC_URL: |
| 75 | valString = `[${value}](${value})`; |
| 76 | break; |
| 77 | case Datatype.RESOURCEARRAY: |
| 78 | { |
| 79 | valString = ''; |
| 80 | valToArray(value).map(item => { |
| 81 | valString = valString + `[${item}](${item}),`; |
| 82 | }); |
| 83 | } |
| 84 | break; |
| 85 | case Datatype.TIMESTAMP: |
| 86 | valString = valToDate(value).toLocaleString(); |
| 87 | break; |
| 88 | } |
| 89 | return `\n\n**${property.shortname}**: ${valString}`; |
| 90 | } |
no test coverage detected