index.js
function getHeapStatistics(unitInfo) {
  const data = v8.getHeapStatistics();
  const keys = Object.keys(data);
  const result = {};
  keys.forEach((key) => {
    result[key] = format(data[key], unitInfo);
  });
  return result;
}
function getHeapStatistics(unitInfo) {
  const data = v8.getHeapStatistics();
  const keys = Object.keys(data);
  const result = {};
  keys.forEach((key) => {
    result[key] = format(data[key], unitInfo);
  });
  return result;
}
function getHeapStatistics ( unitInfo ) { const data = v8 . getHeapStatistics ( ) ; const keys = Object . keys ( data ) ; const result = { } ; keys . forEach ( ( key ) => { result [ key ] = format ( data [ key ] , unitInfo ) ; } ) ; return result ; }
Get the heap statistics
@param {Object} unitInfo The unit format setting
@returns {Object} The heap statistics
Get the heap statistics