lib: replace Float32Array global by the primordials

PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Sebastien Ahkrin authored and Shelley Vohr committed 2020-03-14 11:58:34 -07:00
1 parent 68d48fead3
commit 41f0fa742e
3 files changed
+4

No files matched your search

+2
View File
@@ -19,6 +19,8 @@ rules:
message: "Use `const { Boolean } = primordials;` instead of the global."
- name: Error
message: "Use `const { Error } = primordials;` instead of the global."
- name: Float32Array
message: "Use `const { Float32Array } = primordials;` instead of the global."
- name: JSON
message: "Use `const { JSON } = primordials;` instead of the global."
- name: Map
+1
View File
@@ -2,6 +2,7 @@
const {
BigInt,
Float32Array,
MathFloor,
Number,
} = primordials;
+1
View File
@@ -10,6 +10,7 @@ const {
DatePrototypeToISOString,
DatePrototypeToString,
ErrorPrototypeToString,
Float32Array,
JSONStringify,
Map,
MapPrototype,