Sign in

    sayoi7799/moon_vegalite/value does not have a README file

    Value

    pub(all) enum Value {
    Undef
    Null
    Bool(Bool)
    Num(Double)
    Str(String)
    Arr(Array[Value])
    Obj(Map[String, Value])
    }

    Value::coerce_boolean

    fn Value::coerce_boolean(self : Value) -> Value

    vega-util toBoolean.

    Value::coerce_date

    fn Value::coerce_date(self : Value) -> Value

    vega-util toDate with the default parser: numbers pass through, strings go through Date.parse (NaN when unparsable).

    Value::coerce_number

    fn Value::coerce_number(self : Value) -> Value

    vega-util toNumber: null for null / "", else +v.

    Value::coerce_string

    fn Value::coerce_string(self : Value) -> Value

    vega-util toString: null for null / "", else v + "".

    Value::is_valid

    fn Value::is_valid(self : Value) -> Bool

    vega-lite / vega isValid: not null and not NaN.

    Value::to_js_string

    fn Value::to_js_string(self : Value) -> String

    String(value).

    Value::to_number

    fn Value::to_number(self : Value) -> Double

    +value: JavaScript's unary plus on a cell value.

    Value::truthy

    fn Value::truthy(self : Value) -> Bool

    JavaScript truthiness.

    compare_values

    fn compare_values(u : Value, v : Value) -> Int

    vega-util ascending: nulls first, then natural order; NaN after numbers.

    from_json

    fn from_json(j : Json) -> Value

    Convert JSON to a Value: objects keep their key order, numbers become doubles, true / false / null map to the matching variants.

    get_field

    fn get_field(row : Map[String, Value], path : String) -> Value

    Read a (possibly nested) field of a row; Undef when any step is missing.

    parse_date

    fn parse_date(text : String) -> Double

    JavaScript's Date.parse(text): epoch milliseconds, or NaN for an unrecognised string.

    split_access_path

    fn split_access_path(path : String) -> Array[String]

    Split an access path into its property names.

    string_to_number

    fn string_to_number(s : String) -> Double

    JavaScript's Number(string) (ToNumber applied to a String).

    trim_js

    fn trim_js(s : String) -> String

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io