API/api.medcify.app/node_modules/validator/es/lib/isDivisibleBy.js
2022-09-26 11:41:44 +05:30

6 lines
202 B
JavaScript

import assertString from './util/assertString';
import toFloat from './toFloat';
export default function isDivisibleBy(str, num) {
assertString(str);
return toFloat(str) % parseInt(num, 10) === 0;
}