MCPcopy
hub / github.com/di-sukharev/opencommit / makeEntry

Function makeEntry

out/cli.cjs:52054–52071  ·  view source on GitHub ↗
(name, value, filename)

Source from the content-addressed store, hash-verified

52052 };
52053 FormData6.prototype[Symbol.iterator] = FormData6.prototype.entries;
52054 Object.defineProperties(FormData6.prototype, {
52055 [Symbol.toStringTag]: {
52056 value: "FormData",
52057 configurable: true
52058 }
52059 });
52060 function makeEntry(name, value, filename) {
52061 name = Buffer.from(name).toString("utf8");
52062 if (typeof value === "string") {
52063 value = Buffer.from(value).toString("utf8");
52064 } else {
52065 if (!isFileLike4(value)) {
52066 value = value instanceof Blob5 ? new File5([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type });
52067 }
52068 if (filename !== void 0) {
52069 const options = {
52070 type: value.type,
52071 lastModified: value.lastModified
52072 };
52073 value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File5([value], filename, options) : new FileLike(value, filename, options);
52074 }

Callers 2

appendMethod · 0.85
setMethod · 0.85

Calls 3

isFileLike4Function · 0.85
toStringMethod · 0.45
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…