Skip to content

Commit 41f0fa7

Browse files
Sebastien-Ahkrincodebytere
authored andcommitted
lib: replace Float32Array global by the primordials
PR-URL: #31195 Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 68d48fe commit 41f0fa7

File tree

3 files changed

+4
-0
lines changed

3 files changed

+4
-0
lines changed

lib/.eslintrc.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ rules:
1919
message: "Use `const { Boolean } = primordials;` instead of the global."
2020
- name: Error
2121
message: "Use `const { Error } = primordials;` instead of the global."
22+
- name: Float32Array
23+
message: "Use `const { Float32Array } = primordials;` instead of the global."
2224
- name: JSON
2325
message: "Use `const { JSON } = primordials;` instead of the global."
2426
- name: Map

lib/internal/buffer.js

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

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

lib/internal/util/inspect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const {
1010
DatePrototypeToISOString,
1111
DatePrototypeToString,
1212
ErrorPrototypeToString,
13+
Float32Array,
1314
JSONStringify,
1415
Map,
1516
MapPrototype,

0 commit comments

Comments
 (0)