is 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/package.json +3 -3
- package/test/index.js +1 -0
package/index.js
CHANGED
|
@@ -422,7 +422,7 @@ is.infinite = function (value) {
|
|
|
422
422
|
*/
|
|
423
423
|
|
|
424
424
|
is.decimal = function (value) {
|
|
425
|
-
return is.number(value) && !isActualNaN(value) && value % 1 !== 0;
|
|
425
|
+
return is.number(value) && !isActualNaN(value) && !is.infinite(value) && value % 1 !== 0;
|
|
426
426
|
};
|
|
427
427
|
|
|
428
428
|
/**
|
package/package.json
CHANGED
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"url": "git://github.com/enricomarino/is.git"
|
|
24
24
|
},
|
|
25
25
|
"main": "index.js",
|
|
26
|
-
"version": "0.2.
|
|
26
|
+
"version": "0.2.7",
|
|
27
27
|
"scripts": {
|
|
28
28
|
"test": "node test/index.js"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"tape": "~
|
|
32
|
-
"foreach": "~2.0.
|
|
31
|
+
"tape": "~2.3.2",
|
|
32
|
+
"foreach": "~2.0.4"
|
|
33
33
|
},
|
|
34
34
|
"testling": {
|
|
35
35
|
"files": "test/index.js",
|
package/test/index.js
CHANGED
|
@@ -241,6 +241,7 @@ test('is.decimal', function (t) {
|
|
|
241
241
|
t.notOk(is.decimal(0), 'zero is not decimal');
|
|
242
242
|
t.notOk(is.decimal(1), 'integer is not decimal');
|
|
243
243
|
t.notOk(is.decimal(NaN), 'NaN is not decimal');
|
|
244
|
+
t.notOk(is.decimal(Infinity), 'Infinity is not decimal');
|
|
244
245
|
t.end();
|
|
245
246
|
});
|
|
246
247
|
|