MCPcopy Create free account
hub / github.com/diffusionstudio/vits-web / processData

Function processData

src/piper.js:1869–1887  ·  view source on GitHub ↗
(byteArray)

Source from the content-addressed store, hash-verified

1867 var fullname = name ? PATH_FS.resolve(PATH.join2(parent, name)) : parent;
1868 var dep = getUniqueRunDependency(`cp ${fullname}`);
1869 function processData(byteArray) {
1870 function finish(byteArray) {
1871 if (preFinish) preFinish();
1872 if (!dontCreateFile) {
1873 FS_createDataFile(parent, name, byteArray, canRead, canWrite, canOwn);
1874 }
1875 if (onload) onload();
1876 removeRunDependency(dep);
1877 }
1878 if (
1879 FS_handledByPreloadPlugin(byteArray, fullname, finish, () => {
1880 if (onerror) onerror();
1881 removeRunDependency(dep);
1882 })
1883 ) {
1884 return;
1885 }
1886 finish(byteArray);
1887 }
1888 addRunDependency(dep);
1889 if (typeof url == 'string') {
1890 asyncLoad(url, (byteArray) => processData(byteArray), onerror);

Callers 1

FS_createPreloadedFileFunction · 0.85

Calls 3

removeRunDependencyFunction · 0.85
finishFunction · 0.85

Tested by

no test coverage detected