buffer: introduce File

PR-URL: https://github.com/nodejs/node/pull/45139
Fixes: https://github.com/nodejs/node/issues/39015
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
Khafra 2022-11-10 15:52:45 -05:00 committed by GitHub
parent e9a9e1ea5b
commit 916af4ef2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 804 additions and 0 deletions

View file

@ -126,6 +126,10 @@ const {
resolveObjectURL,
} = require('internal/blob');
const {
File,
} = require('internal/file');
FastBuffer.prototype.constructor = Buffer;
Buffer.prototype = FastBuffer.prototype;
addBufferPrototypeMethods(Buffer.prototype);
@ -1320,6 +1324,7 @@ function atob(input) {
module.exports = {
Blob,
File,
resolveObjectURL,
Buffer,
SlowBuffer,