diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-01-11 07:37:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 15:37:25 -0700 |
commit | 515a34b4de222e35c7ade1b92614d746e73d4c2e (patch) | |
tree | 8284201fc826a33f12597959a8a8be14e0f524bd /ext/fetch/22_body.js | |
parent | d4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff) |
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'ext/fetch/22_body.js')
-rw-r--r-- | ext/fetch/22_body.js | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/ext/fetch/22_body.js b/ext/fetch/22_body.js index 2d633ae39..e16fd4c54 100644 --- a/ext/fetch/22_body.js +++ b/ext/fetch/22_body.js @@ -12,6 +12,28 @@ /// <reference lib="esnext" /> import { core, primordials } from "ext:core/mod.js"; +const { + isAnyArrayBuffer, + isArrayBuffer, +} = core; +const { + ArrayBufferIsView, + ArrayPrototypeMap, + DataViewPrototypeGetBuffer, + DataViewPrototypeGetByteLength, + DataViewPrototypeGetByteOffset, + JSONParse, + ObjectDefineProperties, + ObjectPrototypeIsPrototypeOf, + TypedArrayPrototypeGetBuffer, + TypedArrayPrototypeGetByteLength, + TypedArrayPrototypeGetByteOffset, + TypedArrayPrototypeGetSymbolToStringTag, + TypedArrayPrototypeSlice, + TypeError, + Uint8Array, +} = primordials; + import * as webidl from "ext:deno_webidl/00_webidl.js"; import { parseUrlEncoded, @@ -36,27 +58,6 @@ import { readableStreamTee, readableStreamThrowIfErrored, } from "ext:deno_web/06_streams.js"; -const { - ArrayBufferIsView, - ArrayPrototypeMap, - DataViewPrototypeGetBuffer, - DataViewPrototypeGetByteLength, - DataViewPrototypeGetByteOffset, - JSONParse, - ObjectDefineProperties, - ObjectPrototypeIsPrototypeOf, - TypedArrayPrototypeGetBuffer, - TypedArrayPrototypeGetByteLength, - TypedArrayPrototypeGetByteOffset, - TypedArrayPrototypeGetSymbolToStringTag, - TypedArrayPrototypeSlice, - TypeError, - Uint8Array, -} = primordials; -const { - isAnyArrayBuffer, - isArrayBuffer, -} = core; /** * @param {Uint8Array | string} chunk |