Skip to content

Commit 3e0768d

Browse files
committed
Add node: for internal modules
1 parent 9d8a605 commit 3e0768d

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎JavaScript/3-readable.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
const crypto = require('crypto');
4-
const { Readable } = require('stream');
3+
const crypto = require('node:crypto');
4+
const { Readable } = require('node:stream');
55

66
class RandomStream extends Readable {
77
_read(size = 1) {

‎JavaScript/4-readable.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
const crypto = require('crypto');
4-
const { Readable } = require('stream');
3+
const crypto = require('node:crypto');
4+
const { Readable } = require('node:stream');
55

66
const randomStream = new Readable({
77
read(size = 1) {

‎JavaScript/5-transform.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
const fs = require('fs');
4-
const { Transform } = require('stream');
3+
const fs = require('node:fs');
4+
const { Transform } = require('node:stream');
55

66
class UpperStream extends Transform {
77
_transform(chunk, encoding, callback) {

‎JavaScript/6-transform.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

3-
const fs = require('fs');
4-
const { Transform } = require('stream');
3+
const fs = require('node:fs');
4+
const { Transform } = require('node:stream');
55

66
const upperStream = new Transform({
77
transform(chunk, encoding, callback) {

0 commit comments

Comments
 (0)