isPow10 - nodef/extra-bigint GitHub Wiki

Check if bigint is a power-of-10.

Similar: isPow2, isPow10. Similar: isPow10, prevPow10, nextPow10.

function isPow10(x)
// x: a bigint
const xbigint = require('extra-bigint');


xbigint.isPow10(10n);
// → true

xbigint.isPow10(999n);
// → false

References