Function
is_buffer
(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
Tested by
no test coverage detected