MCPcopy
hub / github.com/webpack/webpack / getSize

Method getSize

lib/cache/PackFileCacheStrategy.js:996–1005  ·  view source on GitHub ↗

* Returns the estimated size for the requested source type. * @returns {number} size of the content or -1 if not known

()

Source from the content-addressed store, hash-verified

994 * @returns {number} size of the content or -1 if not known
995 */
996 getSize() {
997 if (!this.lazy) return -1;
998 const options =
999 /** @type {{ options: { size?: number } }} */
1000 (this.lazy).options;
1001 if (!options) return -1;
1002 const size = options.size;
1003 if (typeof size !== "number") return -1;
1004 return size;
1005 }
1006
1007 /**
1008 * Processes the provided identifier.

Callers 6

getMethod · 0.95
unpackMethod · 0.95
writeLazyMethod · 0.95
getContentStatsMethod · 0.45
_optimizeSmallContentMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected