From f7538fa19f694271a9ba780f3598a422d10f8ab3 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Sat, 21 Oct 2017 23:13:09 +0300 Subject: [PATCH] doc: replace undocumented encoding aliases --- doc/api/errors.md | 2 +- doc/api/fs.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index 5aa39baadd0674..5b8fb7875a7e4b 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1224,7 +1224,7 @@ Example const Socket = require('net').Socket; const instance = new Socket(); -instance.setEncoding('utf-8'); +instance.setEncoding('utf8'); ``` diff --git a/doc/api/fs.md b/doc/api/fs.md index 6e643190584011..ccb2b35a2e967c 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -1284,7 +1284,7 @@ If the file previously was shorter than `len` bytes, it is extended, and the extended part is filled with null bytes ('\0'). For example, ```js -console.log(fs.readFileSync('temp.txt', 'utf-8')); +console.log(fs.readFileSync('temp.txt', 'utf8')); // Prints: Node.js // get the file descriptor of the file to be truncated