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 — stream: do not use crypto.DEFAULT_ENCODING in lazy_transform.js · nodejs/node@7bc2011

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/streams
    • lazy_transform.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/streams/lazy_transform.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/lazy_transform.js
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55

66
const stream = require('stream');
77
const util = require('util');
8-
const crypto = require('crypto');
8+
9+
const {
10+
getDefaultEncoding
11+
} = require('internal/crypto/util');
912

1013
module.exports = LazyTransform;
1114

@@ -22,7 +25,7 @@ function makeGetter(name) {
2225
this._writableState.decodeStrings = false;
2326

2427
if (!this._options || !this._options.defaultEncoding) {
25-
this._writableState.defaultEncoding = crypto.DEFAULT_ENCODING;
28+
this._writableState.defaultEncoding = getDefaultEncoding();
2629
}
2730

2831
return this[name];

0 commit comments

Comments
0 (0)
You are visitor 01402503 — 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.