MCPcopy
hub / github.com/webpack/webpack / asBuffer

Function asBuffer

lib/NormalModule.js:697–702  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

695 * @returns {Buffer} the converted buffer
696 */
697const asBuffer = (input) => {
698 if (!Buffer.isBuffer(input)) {
699 return Buffer.from(input, "utf8");
700 }
701 return input;
702};
703
704/** @typedef {[string | Buffer, string | RawSourceMap | undefined, PreparsedAst | undefined]} Result */
705

Callers 1

processResultMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected