isDivisibleBy.js 202 B

123456
  1. import assertString from './util/assertString';
  2. import toFloat from './toFloat';
  3. export default function isDivisibleBy(str, num) {
  4. assertString(str);
  5. return toFloat(str) % parseInt(num, 10) === 0;
  6. }