summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_fs/_fs_write.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_fs/_fs_write.mjs')
-rw-r--r--ext/node/polyfills/_fs/_fs_write.mjs6
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/node/polyfills/_fs/_fs_write.mjs b/ext/node/polyfills/_fs/_fs_write.mjs
index aa23805bf..1ad6ac492 100644
--- a/ext/node/polyfills/_fs/_fs_write.mjs
+++ b/ext/node/polyfills/_fs/_fs_write.mjs
@@ -13,7 +13,6 @@ import * as io from "ext:deno_io/12_io.js";
import * as fs from "ext:deno_fs/30_fs.js";
import {
getValidatedFd,
- showStringCoercionDeprecation,
validateOffsetLengthWrite,
validateStringAfterArrayBufferView,
} from "ext:deno_node/internal/fs/utils.mjs";
@@ -114,9 +113,6 @@ export function write(fd, buffer, offset, length, position, callback) {
// `fs.write(fd, string[, position[, encoding]], callback)`
validateStringAfterArrayBufferView(buffer, "buffer");
- if (typeof buffer !== "string") {
- showStringCoercionDeprecation();
- }
if (typeof position !== "function") {
if (typeof offset === "function") {
@@ -128,7 +124,7 @@ export function write(fd, buffer, offset, length, position, callback) {
length = "utf-8";
}
- const str = String(buffer);
+ const str = buffer;
validateEncoding(str, length);
callback = maybeCallback(position);
buffer = Buffer.from(str, length);