MCPcopy
hub / github.com/osnr/TabFS / toUtf8Array

Function toUtf8Array

extension/background.js:117–120  ·  view source on GitHub ↗
(stringOrArray)

Source from the content-addressed store, hash-verified

115 };
116
117 function toUtf8Array(stringOrArray) {
118 if (typeof stringOrArray == 'string') { return stringToUtf8Array(stringOrArray); }
119 else { return stringOrArray; }
120 }
121
122 const makeRouteWithContents = (getData, setData) => ({
123 // getData: (req: Request U Vars) -> Promise<contentsOfFile: String|Uint8Array>

Callers 3

getattrFunction · 0.85
openFunction · 0.85
truncateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected