is_odd_or_even

Minimalist and elegant API that returns true if the given number is odd or even.

Usage

import 'package:is_odd_or_even/is_odd_or_even.dart';

isOddOrEven(0);
//=> true
isOddOrEven(1);
//=> true
isOddOrEven(2);
//=> true
isOddOrEven(3);
//=> true

Disclaimer

Implementation shamelessly stolen from the JavaScript package is-odd-or-even

Libraries

is_odd_or_even
Support for doing something awesome. [...]