UNPKG

roc

Version:

Build modern web applications easily

24 lines (20 loc) 483 B
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = toInteger; var _lodash = require('lodash'); /** * Given an input the function will return an number. * * @param {object} input - The input to be converted. * * @returns {number} - The converted result. */ function toInteger(input) { if ((0, _lodash.isInteger)(input)) { return input; } return parseInt(input, 10); } //# sourceMappingURL=to-integer.js.map