MCPcopy Create free account
hub / github.com/Noumena-Network/code / arrayBufferFromText

Function arrayBufferFromText

src/tools/WebFetchTool/utils.test.ts:19–25  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

17const originalAxiosGet = axios.get
18
19function arrayBufferFromText(text: string): ArrayBuffer {
20 const buffer = Buffer.from(text, 'utf8')
21 return buffer.buffer.slice(
22 buffer.byteOffset,
23 buffer.byteOffset + buffer.byteLength,
24 )
25}
26
27function makeAxiosResponse(
28 url: string,

Callers 1

makeAxiosResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected