2018-02-12 17:54:53 +05:30
|
|
|
const FloatControl = require('./float');
|
|
|
|
|
|
|
|
class IntControl extends FloatControl {
|
|
|
|
parse(value) {
|
|
|
|
value = parseInt(value);
|
2018-03-05 22:15:21 +05:30
|
|
|
return isNaN(value) ? 0 : value;
|
2018-02-12 17:54:53 +05:30
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = IntControl;
|