Deprecated as this is now natively available in all modern browsers and Node.js versions.
ES2015
Math.log2()
ponyfill
$ npm install --save math-log2
var mathLog2 = require('math-log2');
mathLog2(5);
//=> 2.321928094887362
MIT © Sindre Sorhus