MCPcopy Create free account
hub / github.com/nodejs/node / makeEntry

Function makeEntry

deps/undici/undici.js:6311–6326  ·  view source on GitHub ↗
(name, value, filename)

Source from the content-addressed store, hash-verified

6309 }
6310 });
6311 function makeEntry(name, value, filename) {
6312 if (typeof value === "string") {
6313 } else {
6314 if (!webidl.is.File(value)) {
6315 value = new File([value], "blob", { type: value.type });
6316 }
6317 if (filename !== void 0) {
6318 const options = {
6319 type: value.type,
6320 lastModified: value.lastModified
6321 };
6322 value = new File([value], filename, options);
6323 }
6324 }
6325 return { name, value };
6326 }
6327 __name(makeEntry, "makeEntry");
6328 webidl.is.FormData = webidl.util.MakeTypeAssertion(FormData);
6329 module2.exports = { FormData, makeEntry, setFormDataState, getFormDataBoundary };

Callers 3

appendMethod · 0.70
setMethod · 0.70
multipartFormDataParserFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected