GeezerVison is showing github.com — lib: enforce the use of Object from primordials · styfle/node@908292c
File tree
Expand file treeCollapse file tree
Open diff view settings
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss bannerExpand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
10 | 10 | message: "Use `const { JSON } = primordials;` instead of the global." |
11 | 11 | - name: Math |
12 | 12 | message: "Use `const { Math } = primordials;` instead of the global." |
| 13 | + - name: Object |
| 14 | + message: "Use `const { Object } = primordials;` instead of the global." |
13 | 15 | - name: Reflect |
14 | 16 | message: "Use `const { Reflect } = primordials;` instead of the global." |
15 | 17 | no-restricted-syntax: |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_http_agent.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
| 24 | +const { Object } = primordials; |
| 25 | + |
24 | 26 | const net = require('net'); |
25 | 27 | const EventEmitter = require('events'); |
26 | 28 | const debug = require('internal/util/debuglog').debuglog('http'); |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_http_client.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
| 24 | +const { Object } = primordials; |
| 25 | + |
24 | 26 | const net = require('net'); |
25 | 27 | const url = require('url'); |
26 | 28 | const assert = require('internal/assert'); |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_http_incoming.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
| 24 | +const { Object } = primordials; |
| 25 | + |
24 | 26 | const Stream = require('stream'); |
25 | 27 |
|
26 | 28 | function readStart(socket) { |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_http_outgoing.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
24 | | -const { ObjectPrototype } = primordials; |
| 24 | +const { Object, ObjectPrototype } = primordials; |
25 | 25 |
|
26 | 26 | const assert = require('internal/assert'); |
27 | 27 | const Stream = require('stream'); |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_http_server.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
| 24 | +const { Object } = primordials; |
| 25 | + |
24 | 26 | const net = require('net'); |
25 | 27 | const assert = require('internal/assert'); |
26 | 28 | const { |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_stream_duplex.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
26 | 26 |
|
27 | 27 | 'use strict'; |
28 | 28 |
|
| 29 | +const { Object } = primordials; |
| 30 | + |
29 | 31 | module.exports = Duplex; |
30 | 32 |
|
31 | 33 | const Readable = require('_stream_readable'); |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_stream_passthrough.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
25 | 25 |
|
26 | 26 | 'use strict'; |
27 | 27 |
|
| 28 | +const { Object } = primordials; |
| 29 | + |
28 | 30 | module.exports = PassThrough; |
29 | 31 |
|
30 | 32 | const Transform = require('_stream_transform'); |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_stream_readable.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
21 | 21 |
|
22 | 22 | 'use strict'; |
23 | 23 |
|
| 24 | +const { Object } = primordials; |
| 25 | + |
24 | 26 | module.exports = Readable; |
25 | 27 | Readable.ReadableState = ReadableState; |
26 | 28 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: lib/_stream_transform.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
63 | 63 |
|
64 | 64 | 'use strict'; |
65 | 65 |
|
| 66 | +const { Object } = primordials; |
| 67 | + |
66 | 68 | module.exports = Transform; |
67 | 69 | const { |
68 | 70 | ERR_METHOD_NOT_IMPLEMENTED, |
|