is-power-of-two
v1.0.0
Published
whether a number is power of two
Downloads
363
Maintainers
Readme
is-power-of-two
Test whether a number is power of two.
var isPOT = require('is-power-of-two')
isPOT(4) === true
isPOT(16) === true
isPOT(10) === false
Usage
powerOfTwo(number)
If the given number
is greater than 0 and a power of 2, returns true. Otherwise returns false.
See Also
License
MIT, see LICENSE.md for details.