Skip to content

Commit

Permalink
Update simplify-expressions.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Jan 20, 2024
1 parent 5c202eb commit 3d8f2dc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/forgetti/src/core/simplify-expressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@ function getBooleanishState(node: t.Expression): LiteralState {
case 'BigIntLiteral':
return node.value === '0' ? 'falsy' : 'truthy';
case 'Identifier': {
switch (node.name) {
case 'NaN':
return 'falsy';
case 'undefined':
return 'nullish';
case 'Infinity':
return 'truthy';
default:
return 'indeterminate';
}
return 'indeterminate';
}
// case 'ArrayExpression':
// case 'FunctionExpression':
Expand Down

0 comments on commit 3d8f2dc

Please sign in to comment.