Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d4d6172

Browse filesBrowse files
Sebastien-Ahkrintargos
authored andcommitted
lib: enforce use of primordial Number
PR-URL: #30700 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 5de272c commit d4d6172
Copy full SHA for d4d6172

File tree

Expand file treeCollapse file tree

8 files changed

+10
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

8 files changed

+10
-1
lines changed
Open diff view settings
Collapse file

‎lib/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ rules:
1717
message: "Use `const { JSON } = primordials;` instead of the global."
1818
- name: Math
1919
message: "Use `const { Math } = primordials;` instead of the global."
20+
- name: Number
21+
message: "Use `const { Number } = primordials;` instead of the global."
2022
- name: Object
2123
message: "Use `const { Object } = primordials;` instead of the global."
2224
- name: Reflect
Collapse file

‎lib/internal/buffer.js‎

Copy file name to clipboardExpand all lines: lib/internal/buffer.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
MathFloor,
5+
Number,
56
} = primordials;
67

78
const {
Collapse file

‎lib/internal/fs/utils.js‎

Copy file name to clipboardExpand all lines: lib/internal/fs/utils.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
ArrayIsArray,
55
DateNow,
6+
Number,
67
NumberIsFinite,
78
ObjectSetPrototypeOf,
89
ReflectOwnKeys,
Collapse file

‎lib/internal/http2/util.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/util.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
const {
44
ArrayIsArray,
55
MathMax,
6+
Number,
67
ObjectCreate,
78
ObjectKeys,
89
} = primordials;
Collapse file

‎lib/internal/repl.js‎

Copy file name to clipboardExpand all lines: lib/internal/repl.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const {
4+
Number,
45
NumberIsNaN,
56
ObjectCreate,
67
} = primordials;
Collapse file

‎lib/internal/url.js‎

Copy file name to clipboardExpand all lines: lib/internal/url.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const {
44
Array,
5+
Number,
56
ObjectCreate,
67
ObjectDefineProperties,
78
ObjectDefineProperty,
Collapse file

‎lib/internal/util/inspect.js‎

Copy file name to clipboardExpand all lines: lib/internal/util/inspect.js
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const {
1616
MathMin,
1717
MathRound,
1818
MathSqrt,
19+
Number,
1920
NumberIsNaN,
2021
NumberPrototypeValueOf,
2122
ObjectAssign,
@@ -39,7 +40,7 @@ const {
3940
SymbolPrototypeValueOf,
4041
SymbolIterator,
4142
SymbolToStringTag,
42-
uncurryThis
43+
uncurryThis,
4344
} = primordials;
4445

4546
const {
Collapse file

‎lib/net.js‎

Copy file name to clipboardExpand all lines: lib/net.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
const {
2525
ArrayIsArray,
2626
Boolean,
27+
Number,
2728
NumberIsNaN,
2829
ObjectDefineProperty,
2930
ObjectSetPrototypeOf,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.