Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Adds isDecimal() #40

Merged
merged 1 commit into from
Jun 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"presets": [
"flow",
"env"
]
}
13 changes: 13 additions & 0 deletions dist/common/isDecimal/isDecimal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use strict';

Object.defineProperty(exports, "__esModule", {
value: true
});

var _utils = require('./../../utils');

var isDecimal = function isDecimal(number) {
return !(0, _utils.isUndefined)(number) && !(0, _utils.isNull)(number) && /^-?\d*\.\d+$/.test(number);
};

exports.default = isDecimal;
2 changes: 1 addition & 1 deletion dist/common/isEmail/isEmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ var _utils = require('./../../utils');

var isEmail = function isEmail(email) {
return !(0, _utils.isUndefined)(email) && !(0, _utils.isNull)(email) && (0, _utils.isString)(email) && /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(email.toLowerCase());
};
}; // @flow
exports.default = isEmail;
111 changes: 54 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading