MCPcopy Index your code
hub / github.com/nodejs/node / fmt_bytes

Function fmt_bytes

deps/v8/tools/locs.py:169–174  ·  view source on GitHub ↗
(num_bytes)

Source from the content-addressed store, hash-verified

167
168
169def fmt_bytes(num_bytes):
170 if num_bytes > 1024*1024*1024:
171 return int(num_bytes / (1024*1024)), "MB"
172 elif num_bytes > 1024*1024:
173 return int(num_bytes / (1024)), "kB"
174 return int(num_bytes), " B"
175
176
177class CompilationData:

Callers 1

to_stringMethod · 0.85

Calls 1

intFunction · 0.85

Tested by

no test coverage detected