MCPcopy Create free account
hub / github.com/react-dropzone/react-dropzone / createFile

Function createFile

src/index.spec.js:3812–3820  ·  view source on GitHub ↗

* createFile creates a mock File object * @param {string} name * @param {number} size * @param {string} type

(name, size, type)

Source from the content-addressed store, hash-verified

3810 * @param {string} type
3811 */
3812function createFile(name, size, type) {
3813 const file = new File([], name, { type });
3814 Object.defineProperty(file, "size", {
3815 get() {
3816 return size;
3817 },
3818 });
3819 return file;
3820}
3821
3822/**
3823 * createThenable creates a Promise that can be controlled from outside its inner scope

Callers 1

index.spec.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…