Skip to content

Commit

Permalink
lib: enforce use of primordial Number
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastien-Ahkrin authored and targos committed Nov 30, 2019
1 parent 1f9a5ae commit 979ed18
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/.eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ rules:
message: "Use `const { JSON } = primordials;` instead of the global."
- name: Math
message: "Use `const { Math } = primordials;` instead of the global."
- name: Number
message: "Use `const { Number } = primordials;` instead of the global."
- name: Object
message: "Use `const { Object } = primordials;` instead of the global."
- name: Reflect
Expand Down
1 change: 1 addition & 0 deletions lib/internal/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const {
MathFloor,
Number,
} = primordials;

const {
Expand Down
1 change: 1 addition & 0 deletions lib/internal/console/constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const {
ArrayIsArray,
Boolean,
MathFloor,
Number,
ObjectDefineProperties,
ObjectDefineProperty,
ObjectKeys,
Expand Down
1 change: 1 addition & 0 deletions lib/internal/fs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const {
ArrayIsArray,
DateNow,
Number,
NumberIsFinite,
ObjectSetPrototypeOf,
ReflectOwnKeys,
Expand Down
1 change: 1 addition & 0 deletions lib/internal/http2/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const {
ArrayIsArray,
MathMax,
Number,
ObjectCreate,
ObjectKeys,
} = primordials;
Expand Down
1 change: 1 addition & 0 deletions lib/internal/repl.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const {
Number,
NumberIsNaN,
ObjectCreate,
} = primordials;
Expand Down
1 change: 1 addition & 0 deletions lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const {
Array,
Number,
ObjectCreate,
ObjectDefineProperties,
ObjectDefineProperty,
Expand Down
3 changes: 2 additions & 1 deletion lib/internal/util/inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const {
MathMin,
MathRound,
MathSqrt,
Number,
NumberIsNaN,
NumberPrototypeValueOf,
ObjectAssign,
Expand All @@ -39,7 +40,7 @@ const {
SymbolPrototypeValueOf,
SymbolIterator,
SymbolToStringTag,
uncurryThis
uncurryThis,
} = primordials;

const {
Expand Down
1 change: 1 addition & 0 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
const {
ArrayIsArray,
Boolean,
Number,
NumberIsNaN,
ObjectDefineProperty,
ObjectSetPrototypeOf,
Expand Down

0 comments on commit 979ed18

Please sign in to comment.