MCPcopy Create free account
hub / github.com/awslabs/llrt / is_buffer

Function is_buffer

modules/llrt_buffer/src/buffer.rs:310–317  ·  view source on GitHub ↗
(ctx: Ctx<'js>, value: Value<'js>)

Source from the content-addressed store, hash-verified

308 let bytes = bytes.into();
309 return Buffer::from_encoding(&ctx, bytes, encoding)?.into_js(&ctx);
310 } else {
311 let (array_buffer, _, source_offset) = ab_bytes.get_array_buffer()?.unwrap(); //we know it's an array buffer
312 return Buffer::from_array_buffer_offset_length(
313 &ctx,
314 array_buffer,
315 start + source_offset,
316 end - start,
317 );
318 }
319 }
320 }

Callers

nothing calls this directly

Calls 2

getFunction · 0.85
as_objectMethod · 0.80

Tested by

no test coverage detected