Skip to content

Commit 01c67c7

Browse files
lib: replace Map global by the primordials
1 parent e9695d9 commit 01c67c7

23 files changed

+31
-1
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ rules:
2929
message: "Use `const { Reflect } = primordials;` instead of the global."
3030
- name: Symbol
3131
message: "Use `const { Symbol } = primordials;` instead of the global."
32+
- name: Map
33+
message: "Use `const { Map } = primordials;` instead of the global."
3234
no-restricted-syntax:
3335
# Config copied from .eslintrc.js
3436
- error

lib/assert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const {
2525
ObjectIs,
2626
ObjectKeys,
2727
ObjectPrototypeIsPrototypeOf,
28+
Map,
2829
NumberIsNaN,
2930
RegExpPrototypeTest,
3031
} = primordials;

lib/domain.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828

2929
const {
3030
Array,
31+
Map,
3132
ObjectDefineProperty,
3233
ReflectApply,
3334
Symbol,

lib/fs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
'use strict';
2626

2727
const {
28+
Map,
2829
MathMax,
2930
NumberIsSafeInteger,
3031
ObjectCreate,

lib/inspector.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
JSONParse,
55
JSONStringify,
6+
Map,
67
Symbol,
78
} = primordials;
89

lib/internal/bootstrap/loaders.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@
4444
/* global process, getLinkedBinding, getInternalBinding, primordials */
4545

4646
const {
47-
ReflectGet,
47+
Map,
4848
ObjectCreate,
4949
ObjectDefineProperty,
5050
ObjectKeys,
5151
ObjectPrototypeHasOwnProperty,
52+
ReflectGet,
5253
SafeSet,
5354
} = primordials;
5455

lib/internal/bootstrap/pre_execution.js

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

33
const {
4+
Map,
45
ObjectDefineProperty,
56
SafeWeakMap,
67
} = primordials;

lib/internal/cluster/child.js

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

33
const {
4+
Map,
45
ObjectAssign,
56
} = primordials;
67

lib/internal/cluster/master.js

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

33
const {
4+
Map,
45
ObjectKeys,
56
ObjectValues,
67
} = primordials;

lib/internal/cluster/round_robin_handle.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
Boolean,
5+
Map,
56
} = primordials;
67

78
const assert = require('internal/assert');

0 commit comments

Comments
 (0)