Skip to content

Commit

Permalink
Revert "fix(get-static-value): for Math.random()" (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi authored Mar 17, 2023
1 parent 5b854b2 commit 2441fa7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/get-static-value.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions test/get-static-value.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down

0 comments on commit 2441fa7

Please # to comment.