(string)
| 212 | } |
| 213 | |
| 214 | function decodePerson(string) { |
| 215 | var match = string.match(/^([^<]*) <([^>]*)> ([^ ]*) (.*)$/); |
| 216 | if (!match) throw new Error("Improperly formatted person string"); |
| 217 | return { |
| 218 | name: match[1], |
| 219 | email: match[2], |
| 220 | date: { |
| 221 | seconds: parseInt(match[3], 10), |
| 222 | offset: parseInt(match[4], 10) / 100 * -60 |
| 223 | } |
| 224 | }; |
| 225 | } |
| 226 | |
| 227 | function deframe(buffer, decode) { |
| 228 | var space = indexOf(buffer, 0x20); |
no outgoing calls
no test coverage detected