MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / getBodyLength2

Function getBodyLength2

out/cli.cjs:76916–76930  ·  view source on GitHub ↗
(body)

Source from the content-addressed store, hash-verified

76914 } else {
76915 reject(new RestError(`Error reading response as text: ${e3.message}`, {
76916 code: RestError.PARSE_ERROR
76917 }));
76918 }
76919 });
76920 });
76921}
76922function getBodyLength2(body) {
76923 if (!body) {
76924 return 0;
76925 } else if (Buffer.isBuffer(body)) {
76926 return body.length;
76927 } else if (isReadableStream2(body)) {
76928 return null;
76929 } else if (isArrayBuffer2(body)) {
76930 return body.byteLength;
76931 } else if (typeof body === "string") {
76932 return Buffer.from(body).length;
76933 } else {

Callers 1

sendRequestMethod · 0.85

Calls 3

isReadableStream2Function · 0.85
isArrayBuffer2Function · 0.85
fromMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…