MCPcopy
hub / github.com/webpack/webpack / getContent

Method getContent

lib/Compiler.js:869–878  ·  lib/Compiler.js::Compiler.getContent
()

Source from the content-addressed store, hash-verified

867 * @returns {Buffer} content for the source
868 */
869 const getContent = () => {
870 if (typeof source.buffer === class="st">"function") {
871 return source.buffer();
872 }
873 const bufferOrString = source.source();
874 if (Buffer.isBuffer(bufferOrString)) {
875 return bufferOrString;
876 }
877 return Buffer.from(bufferOrString, class="st">"utf8");
878 };
879
880 const alreadyWritten = () => {
881 class="cm">// cache the information that the Source has been already been written to that location

Callers

nothing calls this directly

Calls 1

sourceMethod · 0.80

Tested by

no test coverage detected