(fields: Iterator<string>)
| 73 | } |
| 74 | |
| 75 | export function decodeBool(fields: Iterator<string>): boolean { |
| 76 | const r = fields.next() |
| 77 | if (r.done) throw new BadMessage('no more fields') |
| 78 | const s = r.value |
| 79 | return parseInt(s || '0', 10) !== 0 |
| 80 | } |
| 81 | |
| 82 | export function decodeDecimal(fields: Iterator<string>): Decimal { |
| 83 | const r = fields.next() |
no test coverage detected