Skip to content

Commit 2441fa7

Browse files
authored
Revert "fix(get-static-value): for Math.random()" (#78)
1 parent 5b854b2 commit 2441fa7

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

Diff for: src/get-static-value.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ const callAllowed = new Set(
7979
isNaN,
8080
isPrototypeOf,
8181
...Object.getOwnPropertyNames(Math)
82-
.filter((k) => k !== "random")
8382
.map((k) => Math[k])
8483
.filter((f) => typeof f === "function"),
8584
Number,

Diff for: test/get-static-value.mjs

-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ describe("The 'getStaticValue' function", () => {
4343
{ code: "foo(7)", expected: null },
4444
{ code: "obj.foo(7)", expected: null },
4545
{ code: "Math.round(a)", expected: null },
46-
{ code: "Math.random()", expected: null },
47-
{ code: "Math['random']()", expected: null },
4846
{ code: "true ? 1 : c", expected: { value: 1 } },
4947
{ code: "false ? b : 2", expected: { value: 2 } },
5048
{ code: "a ? 1 : 2", expected: null },

0 commit comments

Comments
 (0)