Skip to main content

Crate use_js_value

Crate use_js_value 

Source
Expand description

§use-js-value

JavaScript-like primitive value metadata for RustUse.

§Experimental

use-js-value is experimental while use-js remains below 0.3.0.

§Example

use use_js_value::JsPrimitiveValue;

let value = JsPrimitiveValue::String(String::from("hello"));

assert_eq!(value.type_name(), "string");
assert!(value.is_truthy_like());
assert!(!value.is_nullish());

§Scope

  • Primitive JavaScript-like value labels and small helpers.
  • Approximate truthy/nullish classification for metadata use.

§Non-goals

  • Interpreter behavior.
  • JavaScript object semantics.
  • Equality, coercion, prototype, or execution modeling.

§License

Licensed under either Apache-2.0 or MIT.

Enums§

JsPrimitiveValue
Primitive JavaScript-like values for metadata and validation helpers.