You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
332 B
11 lines
332 B
var isStr = require('./isStr'); |
|
var isNaN = require('./isNaN'); |
|
var isFinite = require('./isFinite'); |
|
var isArr = require('./isArr'); |
|
exports = function(val) { |
|
if (isStr(val)) val = val.replace(regComma, ''); |
|
return !isNaN(parseFloat(val)) && isFinite(val) && !isArr(val); |
|
}; |
|
var regComma = /,/g; |
|
|
|
module.exports = exports;
|
|
|