From 274c7701f32136a25ff7286a9b712118ed48f2bd Mon Sep 17 00:00:00 2001 From: Sebastien Ahkrin Date: Sun, 5 Jan 2020 14:17:14 +0100 Subject: [PATCH] lib: replace Float32Array global by the primordials --- lib/.eslintrc.yaml | 2 ++ lib/internal/buffer.js | 1 + lib/internal/util/inspect.js | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 04084df3fd9d57..454b1a44975143 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -17,6 +17,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 diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index ff703f11fd648e..c344a994181b9b 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -2,6 +2,7 @@ const { BigInt, + Float32Array, MathFloor, Number, } = primordials; diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index 89b9c7b8b9df03..3e76d2b29d13c6 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -9,6 +9,7 @@ const { DatePrototypeToISOString, DatePrototypeToString, ErrorPrototypeToString, + Float32Array, JSONStringify, Map, MapPrototype,