MCPcopy Create free account
hub / github.com/denoland/std / getRange

Function getRange

cli/unstable_get_cursor.ts:69–78  ·  view source on GitHub ↗
(buffer: Uint8Array, min: number, max: number)

Source from the content-addressed store, hash-verified

67}
68
69function getRange(buffer: Uint8Array, min: number, max: number) {
70 let i = 0;
71 for (; i < buffer.length; ++i) {
72 const byte = buffer[i]!;
73 if (byte < min || max < byte) {
74 return buffer.subarray(0, i);
75 }
76 }
77 return buffer.subarray(0, i);
78}

Callers 1

findCSIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected