ethers.js/docs.wrm/api/utils/bignumber-examples.js
2019-08-21 01:53:47 -04:00

17 lines
320 B
JavaScript

// <hide>
const { BigNumber } = require("./packages/ethers");
function _inspect(result) {
if (BigNumber.isBigNumber(result)) {
return `{ BigNumber: ${ JSON.stringify(result.toString()) } }`;
}
return result;
}
// </hide>
let a = BigNumber.from(42);
let b = BigNumber.from("91");
a.mul(b);
//!