Skip to content

Commit e2dc4da

Browse files
authored
add bodymixin bytes (#3262)
* add bodymixin bytes * use git node wpt instead of sparse-checkout * fixup? * fixup * fixup
1 parent 903c667 commit e2dc4da

File tree

3,118 files changed

+7189
-20385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,118 files changed

+7189
-20385
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 42 deletions

lib/web/fetch/body.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,15 @@ function bodyMixinMethods (instance) {
385385
'Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".'
386386
)
387387
}, instance, false)
388+
},
389+
390+
bytes () {
391+
// The bytes() method steps are to return the result of running consume body
392+
// with this and the following step given a byte sequence bytes: return the
393+
// result of creating a Uint8Array from bytes in this’s relevant realm.
394+
return consumeBody(this, (bytes) => {
395+
return new Uint8Array(bytes)
396+
}, instance, true)
388397
}
389398
}
390399

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
"ignore": [
138138
"lib/llhttp/constants.js",
139139
"lib/llhttp/utils.js",
140-
"test/wpt/tests"
140+
"test/fixtures/wpt"
141141
]
142142
},
143143
"tsd": {

0 commit comments

Comments
 (0)