Skip to content

Commit

Permalink
feat: support sign
Browse files Browse the repository at this point in the history
  • Loading branch information
zuixinwang committed Jun 9, 2023
1 parent c9afb16 commit 1ef3ab2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function destr (value: any, options: Options = {}): any {
// eslint-disable-next-line unicorn/no-null
if (_lval === "null") { return null; }
if (_lval === "nan") { return Number.NaN; }
if (_lval === "infinity") { return Number.POSITIVE_INFINITY; }
if (_lval === "infinity" || _lval === "+infinity") { return Number.POSITIVE_INFINITY; }
if (_lval === "-infinity") { return Number.NEGATIVE_INFINITY; }
if (_lval === "undefined") { return undefined; }

Expand Down

0 comments on commit 1ef3ab2

Please sign in to comment.