MCPcopy
hub / github.com/webpack/webpack / getItemSize

Function getItemSize

lib/stats/DefaultStatsFactoryPlugin.js:1809–1817  ·  view source on GitHub ↗
(item)

Source from the content-addressed store, hash-verified

1807 * @returns {number} item size
1808 */
1809const getItemSize = (item) =>
1810 // Each item takes 1 line
1811 // + the size of the children
1812 // + 1 extra line when it has children and filteredChildren
1813 !item.children
1814 ? 1
1815 : item.filteredChildren
1816 ? 2 + getTotalSize(item.children)
1817 : 1 + getTotalSize(item.children);
1818
1819/**
1820 * Returns total size.

Callers 2

getTotalSizeFunction · 0.85
spaceLimitedFunction · 0.85

Calls 1

getTotalSizeFunction · 0.85

Tested by

no test coverage detected