Skip to content

Commit

Permalink
Merge pull request #1 from mathiasbynens/patch-1
Browse files Browse the repository at this point in the history
Simplify code
  • Loading branch information
ljharb committed May 14, 2014
2 parents 290d6c5 + efdf0ba commit 9eeb6e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

module.exports = function isNegativeZero(value) {
return Number(value) === 0 && Infinity / Number(value) < 0;
var number = Number(value);
return number === 0 && (1 / number) === -Infinity;
};

0 comments on commit 9eeb6e2

Please sign in to comment.