https://github.com/an-empty-string/is-divisible
A simple node dot js library to check if numbers are divisible by other ones
https://github.com/an-empty-string/is-divisible
Last synced: 4 months ago
JSON representation
A simple node dot js library to check if numbers are divisible by other ones
- Host: GitHub
- URL: https://github.com/an-empty-string/is-divisible
- Owner: an-empty-string
- Created: 2020-09-18T02:12:22.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2020-09-18T02:13:33.000Z (over 5 years ago)
- Last Synced: 2025-03-23T22:06:51.793Z (11 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# divisibility
A simple way to check if a number is divisibile by another number in JavaScript!
Usage is easy as long as the number you want to check divisibility by is less than 1000.
## Usage
Simply call the appropriate function. Want to check if a number is even?
var divisibility = require("divisibility");
var isThreeEven = divisibility.isDivisibleByTwo(3); // false
var isFourEven = divisibility.isDivisibleByTwo(4); // true
Need to check against a bigger number? No problem!
var divisibility = require("divisibility");
var check = divisibility.isDivisibleByThreeHundredAndSixtyTwo(362); // true
var check2 = divisibility.isDivisibleByFourHundredAndSeventyEight(5); // false
var check3 = divisibility.isDivisibleByTwelve(13); // falseb
## Bug reports
This package contains no bugs and is production-ready!