1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.default = isNumeric;
|
7 |
|
8 | var _assertString = _interopRequireDefault(require("./util/assertString"));
|
9 |
|
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11 |
|
12 | var numeric = /^[+-]?([0-9]*[.])?[0-9]+$/;
|
13 | var numericNoSymbols = /^[0-9]+$/;
|
14 |
|
15 | function isNumeric(str, options) {
|
16 | (0, _assertString.default)(str);
|
17 |
|
18 | if (options && options.no_symbols) {
|
19 | return numericNoSymbols.test(str);
|
20 | }
|
21 |
|
22 | return numeric.test(str);
|
23 | }
|
24 |
|
25 | module.exports = exports.default; |
\ | No newline at end of file |