(ctx: Ctx<'_>, size: usize)
| 145 | if let Some(value) = value.as_int() { |
| 146 | let bytes = vec![value as u8; length]; |
| 147 | return Buffer(bytes).into_js(&ctx); |
| 148 | } |
| 149 | if let Some(obj) = value.as_object() { |
| 150 | if let Some(ob) = ObjectBytes::from_array_buffer(obj)? { |
| 151 | let bytes = ob.as_bytes(&ctx)?; |
| 152 | return alloc_byte_ref(&ctx, bytes, length); |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | Buffer(vec![0; length]).into_js(&ctx) |
nothing calls this directly
no test coverage detected