Skip to content

Commit afe3530

Browse files
juanarbolBridgeAR
authored andcommitted
doc: fs.write is not longer coercing strings
PR-URL: #31030 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
1 parent fb6df3b commit afe3530

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/api/fs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3985,7 +3985,7 @@ changes:
39853985
* `string` {string}
39863986

39873987
Write `string` to the file specified by `fd`. If `string` is not a string, then
3988-
the value will be coerced to one.
3988+
an exception will be thrown.
39893989

39903990
`position` refers to the offset from the beginning of the file where this data
39913991
should be written. If `typeof position !== 'number'` the data will be written at
@@ -4051,7 +4051,7 @@ changes:
40514051
* `err` {Error}
40524052

40534053
When `file` is a filename, asynchronously writes data to the file, replacing the
4054-
file if it already exists. `data` can be a string or a buffer.
4054+
file if it already exists. `data` can be a string or a buffer.
40554055

40564056
When `file` is a file descriptor, the behavior is similar to calling
40574057
`fs.write()` directly (which is recommended). See the notes below on using

0 commit comments

Comments
 (0)