* Converts a buffer or buffer-like object to a string. * @param {string | ArrayBuffer | ArrayBufferView} body - The buffer or buffer-like object to convert to a string. * @returns {string} The resulting string.
(body)
| 449 | * @returns {string} The resulting string. |
| 450 | */ |
| 451 | function stringify(body) { |
| 452 | if (typeof body === 'string') { return body; } |
| 453 | assertBufferSource(body, false, 'load'); |
| 454 | const { TextDecoder } = require('internal/encoding'); |
| 455 | DECODER = DECODER === null ? new TextDecoder() : DECODER; |
| 456 | return DECODER.decode(body); |
| 457 | } |
| 458 | |
| 459 | /** |
| 460 | * Enable on-disk compiled cache for all user modules being compiled in the current Node.js instance |
no test coverage detected
searching dependent graphs…