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

Function is_encoding

modules/llrt_buffer/src/buffer.rs:319–326  ·  view source on GitHub ↗
(value: Value)

Source from the content-addressed store, hash-verified

317 );
318 }
319 }
320 }
321
322 if let Some(string) = get_coerced_string(&value) {
323 return Buffer::from_string_encoding(&ctx, string, encoding)?.into_js(&ctx);
324 }
325
326 Err(Exception::throw_message(
327 &ctx,
328 "value must be typed DataView, Buffer, ArrayBuffer, Uint8Array or interpretable as string",
329 ))

Callers

nothing calls this directly

Calls 2

to_stringMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected