I’m attempting to import a CDN library to solve the JavaScript 53 bit number limitation but it doesn’t seem to recognize it. I’m going off the example of the Postman documentation (Adding External Libraries in Postman | Postman Blog) Pull a library from a CDN. Here is the library’s instructions on how to use it. bignumber.js API
If I remove the let x = new BigNumber(nnnnnnnnnn), it’s fine but, of course, it doesn’t solve my need for numbers longer than 53 bits.
@G-Laser I noticed that bignumber.js
sets the BigNumber
constructor on this
. So, this.BigNumber
might work for you.
I also verified this using the following snippet:
eval((await pm.sendRequest('https://cdn.jsdelivr.net/npm/[email protected]/bignumber.min.js')).text());
const { BigNumber } = this.BigNumber;
let x = new BigNumber('-448207659001560319');
console.log(x); // "-448207659001560319"
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.