Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yeion7/isdivisible
return if a number is divisible
https://github.com/yeion7/isdivisible
Last synced: 20 days ago
JSON representation
return if a number is divisible
- Host: GitHub
- URL: https://github.com/yeion7/isdivisible
- Owner: yeion7
- License: other
- Created: 2016-06-26T14:05:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-26T14:43:55.000Z (over 8 years ago)
- Last Synced: 2024-11-19T06:01:47.856Z (about 1 month ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# isDivisible
Curry function that return if a number is divisible## API
### Basic
The function receive two arguments, the first is the dividend,
the second is the divisor.```javascript
import isDivisible from 'isDivisible'isDivisible(9, 3) //true
isDivisible(9, 2) //false
```### Curry
You can compose new functions```javascript
import isDivisible from 'isDivisible'
import { __ } from 'ramda'const isDivisibleBy3 = isDivisible(__, 3)
isDivisibleBy3(9) //true
isDivisibleBy3(4) //false
```