is-number-divisible-by-other-number

1.0.1 • Public • Published

is-number-divisible-by-other-number

Check if a number is divisible by another number.

Inspired by @an-empty-string’s package divisibility.

Usage

Simply call the appropriate function!

const isNumberDivisibleByOtherNumber = require("is-number-divisible-by-other-number");
isNumberDivisibleByOtherNumber.isSixDivisibleByThree(); // => true
isNumberDivisibleByOtherNumber.isSixDivisibleByFour(); // => false
isNumberDivisibleByOtherNumber.isTwoHundredTwentyOneDivisibleBySeventeen(); // => true

You can even test large numbers!

isNumberDivisibleByOtherNumber.isFourteenMillionFiftyEightThousandSixHundredNinetyFourDivisibleBySevenMillionTwentyNineThousandThreeHundredFortySeven(); // => true
isNumberDivisibleByOtherNumber.isFourteenMillionFiftyEightThousandSixHundredNinetyFourDivisibleBySevenMillionTwentyNineThousandThreeHundredFortyEight(); // => false

Tests

is-number-divisible-by-other-number uses Jest for tests.

To run the tests:

npm install
npm test

License

is-number-divisible-by-other-number is licensed under the GNU Affero General Public License, version 3.0 or later; see LICENSE.

Readme

Keywords

none

Package Sidebar

Install

npm i is-number-divisible-by-other-number

Weekly Downloads

0

Version

1.0.1

License

AGPL-3.0+

Unpacked Size

42.4 kB

Total Files

5

Last publish

Collaborators

  • taylor.fish