File
Blob: src/node/buffer.ts
| 1 | // Copyright (c) 2017-2022 Cloudflare, Inc. |
| 2 | // Licensed under the Apache 2.0 license found in the LICENSE file or at: |
| 3 | // https://opensource.org/licenses/Apache-2.0 |
| 4 | |
| 5 | import { |
| 6 | constants, |
| 7 | kMaxLength, |
| 8 | kStringMaxLength, |
| 9 | Buffer, |
| 10 | SlowBuffer, |
| 11 | isAscii, |
| 12 | isUtf8, |
| 13 | transcode, |
| 14 | INSPECT_MAX_BYTES, |
| 15 | resolveObjectURL, |
| 16 | } from 'node-internal:internal_buffer'; |
| 17 | |
| 18 | const atob = globalThis.atob.bind(globalThis); |
| 19 | const btoa = globalThis.btoa.bind(globalThis); |
| 20 | const Blob = globalThis.Blob; |
| 21 | const File = globalThis.File; |
| 22 | |
| 23 | export { |
| 24 | atob, |
| 25 | btoa, |
| 26 | constants, |
| 27 | kMaxLength, |
| 28 | kStringMaxLength, |
| 29 | Blob, |
| 30 | Buffer, |
| 31 | File, |
| 32 | SlowBuffer, |
| 33 | isAscii, |
| 34 | isUtf8, |
| 35 | transcode, |
| 36 | INSPECT_MAX_BYTES, |
| 37 | resolveObjectURL, |
| 38 | }; |
| 39 | |
| 40 | export default { |
| 41 | atob, |
| 42 | btoa, |
| 43 | constants, |
| 44 | kMaxLength, |
| 45 | kStringMaxLength, |
| 46 | Blob, |
| 47 | Buffer, |
| 48 | File, |
| 49 | SlowBuffer, |
| 50 | isAscii, |
| 51 | isUtf8, |
| 52 | transcode, |
| 53 | INSPECT_MAX_BYTES, |
| 54 | resolveObjectURL, |
| 55 | }; |