(str)
| 251 | |
| 252 | // unicodeEscape prints the str contents as unicode escape codes. |
| 253 | function unicodeEscape(str) { |
| 254 | let r = ''; |
| 255 | for (let i = 0; i < str.length; i++) { |
| 256 | r += `\\u${str.charCodeAt(i).toString(16)}`; |
| 257 | } |
| 258 | return r; |
| 259 | } |
| 260 | |
| 261 | // writeSequences returns an array of arrays that describes all possible ways a |
| 262 | // buffer of the given length could be split up and passed to sequential write |