Given a number, returns the nearest power of two.
var npot = require('nearest-power-of-two') npot(3) === 4
The package exports a single function which takes a number
and returns a number. Only works for numbers less than 2^32.
Selectively mirror the npm registry inside your firewall. Filter packages based on security, licensing, code quality and more. Build awesome stuff faster. Try npm Enterprise for free…
how? learn more