diff --git a/src/get-static-value.mjs b/src/get-static-value.mjs index ad6551f..078a7ff 100644 --- a/src/get-static-value.mjs +++ b/src/get-static-value.mjs @@ -79,7 +79,6 @@ const callAllowed = new Set( isNaN, isPrototypeOf, ...Object.getOwnPropertyNames(Math) - .filter((k) => k !== "random") .map((k) => Math[k]) .filter((f) => typeof f === "function"), Number, diff --git a/test/get-static-value.mjs b/test/get-static-value.mjs index a7760e2..6bed46b 100644 --- a/test/get-static-value.mjs +++ b/test/get-static-value.mjs @@ -43,8 +43,6 @@ describe("The 'getStaticValue' function", () => { { code: "foo(7)", expected: null }, { code: "obj.foo(7)", expected: null }, { code: "Math.round(a)", expected: null }, - { code: "Math.random()", expected: null }, - { code: "Math['random']()", expected: null }, { code: "true ? 1 : c", expected: { value: 1 } }, { code: "false ? b : 2", expected: { value: 2 } }, { code: "a ? 1 : 2", expected: null },