Skip to content

util: support BigInt in util.format

Adding support for BigInt in util.format and console.log. Placeholder %d is replaced as Number when BigInt is set in second argument. Now, util.format('%d', 1180591620717411303424n) returns '1.1805916207174113e+21'. However, expected result is '1180591620717411303424'.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading