@@ -435,6 +435,9 @@ changes:
435435
436436Write ` buffer` to the file.
437437
438+ If ` buffer` is a plain object, it must have an own (not inherited) ` toString`
439+ function property.
440+
438441The promise is resolved with an object containing two properties:
439442
440443* ` bytesWritten` {integer} the number of bytes written
@@ -1273,8 +1276,8 @@ changes:
12731276* Returns: {Promise} Fulfills with `undefined` upon success.
12741277
12751278Asynchronously writes data to a file, replacing the file if it already exists.
1276- `data` can be a string, a {Buffer}, or an object with an own `toString` function
1277- property.
1279+ `data` can be a string, a {Buffer}, or, an object with an own (not inherited)
1280+ `toString` function property.
12781281
12791282The `encoding` option is ignored if `data` is a buffer.
12801283
@@ -3893,7 +3896,9 @@ When `file` is a file descriptor, the behavior is similar to calling
38933896a file descriptor.
38943897
38953898The ` encoding` option is ignored if ` data` is a buffer.
3896- If ` data` is a normal object, it must have an own ` toString` function property.
3899+
3900+ If ` data` is a plain object, it must have an own (not inherited) ` toString`
3901+ function property.
38973902
38983903` ` ` mjs
38993904import { writeFile } from ' fs' ;
@@ -4973,6 +4978,9 @@ changes:
49734978
49744979Returns ` undefined ` .
49754980
4981+ If ` data` is a plain object, it must have an own (not inherited) ` toString`
4982+ function property.
4983+
49764984For detailed information, see the documentation of the asynchronous version of
49774985this API: [` fs .writeFile ()` ][].
49784986
@@ -5007,6 +5015,9 @@ changes:
50075015* ` position` {integer}
50085016* Returns: {number} The number of bytes written.
50095017
5018+ If ` buffer` is a plain object, it must have an own (not inherited) ` toString`
5019+ function property.
5020+
50105021For detailed information, see the documentation of the asynchronous version of
50115022this API: [` fs .write (fd, buffer... )` ][].
50125023
@@ -5033,6 +5044,9 @@ changes:
50335044* ` encoding` {string}
50345045* Returns: {number} The number of bytes written.
50355046
5047+ If ` string` is a plain object, it must have an own (not inherited) ` toString`
5048+ function property.
5049+
50365050For detailed information, see the documentation of the asynchronous version of
50375051this API: [` fs .write (fd, string... )` ][].
50385052
0 commit comments