1.0.0 • Published 9 years ago

is-power-of-two v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

is-power-of-two

frozen

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

NPM

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.