Skip to content

Commit b29beef

Browse files
lib: add String primordials
1 parent c095808 commit b29beef

File tree

17 files changed

+28
-0
lines changed

17 files changed

+28
-0
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ rules:
4141
message: "Use `const { RegExp } = primordials;` instead of the global."
4242
- name: Set
4343
message: "Use `const { Set } = primordials;` instead of the global."
44+
- name: String
45+
message: "Use `const { String } = primordials;` instead of the global."
4446
- name: Symbol
4547
message: "Use `const { Symbol } = primordials;` instead of the global."
4648
- name: Uint16Array

lib/_http_client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const {
2929
ObjectAssign,
3030
ObjectKeys,
3131
ObjectSetPrototypeOf,
32+
String,
3233
Symbol
3334
} = primordials;
3435

lib/assert.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const {
2929
Map,
3030
NumberIsNaN,
3131
RegExpPrototypeTest,
32+
String,
3233
} = primordials;
3334

3435
const { Buffer } = require('buffer');

lib/events.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ const {
3636
PromiseResolve,
3737
ReflectApply,
3838
ReflectOwnKeys,
39+
String,
3940
Symbol,
4041
SymbolFor,
4142
SymbolAsyncIterator

lib/internal/assert/assertion_error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const {
77
ObjectDefineProperty,
88
ObjectGetPrototypeOf,
99
ObjectKeys,
10+
String,
1011
} = primordials;
1112

1213
const { inspect } = require('internal/util/inspect');

lib/internal/bootstrap/loaders.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ const {
5252
ObjectPrototypeHasOwnProperty,
5353
ReflectGet,
5454
SafeSet,
55+
String,
5556
} = primordials;
5657

5758
// Set up process.moduleLoadList.

lib/internal/errors.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,12 @@ const {
1919
NumberIsInteger,
2020
ObjectDefineProperty,
2121
ObjectKeys,
22+
<<<<<<< HEAD
2223
StringPrototypeSlice,
2324
StringPrototypeStartsWith,
25+
=======
26+
String,
27+
>>>>>>> lib: add String primordials
2428
Symbol,
2529
SymbolFor,
2630
WeakMap,

lib/internal/http2/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const {
88
ObjectCreate,
99
ObjectKeys,
1010
Set,
11+
String,
1112
Symbol,
1213
} = primordials;
1314

lib/internal/modules/cjs/loader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ const {
3939
ReflectSet,
4040
RegExpPrototypeTest,
4141
SafeMap,
42+
<<<<<<< HEAD
4243
SafeWeakMap,
44+
=======
45+
>>>>>>> lib: add String primordials
4346
String,
4447
StringPrototypeIndexOf,
4548
StringPrototypeLastIndexOf,

lib/internal/process/warning.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
ArrayIsArray,
55
Error,
6+
String,
67
} = primordials;
78

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

0 commit comments

Comments
 (0)