Détail du package

is-power-of-two

mattdesl146MIT1.0.0

whether a number is power of two

power, of, two, is

readme

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.