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

Function getFileDataAsTypedArray

src/piper.js:1601–1605  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

1599 return node;
1600 },
1601 getFileDataAsTypedArray(node) {
1602 if (!node.contents) return new Uint8Array(0);
1603 if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes);
1604 return new Uint8Array(node.contents);
1605 },
1606 expandFileStorage(node, newCapacity) {
1607 var prevCapacity = node.contents ? node.contents.length : 0;
1608 if (prevCapacity >= newCapacity) return;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected