GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — string_decoder: don't cache Buffer.isEncoding · Fishrock123/node@96ca599

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • string_decoder.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/string_decoder.js‎

Copy file name to clipboardExpand all lines: lib/string_decoder.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
'use strict';
22

3-
const isEncoding = Buffer.isEncoding;
4-
53
function assertEncoding(encoding) {
6-
if (encoding && !isEncoding(encoding)) {
4+
// Do not cache `Buffer.isEncoding`, some modules monkey-patch it to support
5+
// additional encodings
6+
if (encoding && !Buffer.isEncoding(encoding)) {
77
throw new Error('Unknown encoding: ' + encoding);
88
}
99
}

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.