x

    Focused utility collections, traits, and value types for MoonBit

    copy
    path
    ring-buffer
    trait
    moonbit
    Download zip
    Author
    Version
    0.9.0
    License
    MIT
    Last updated
    6 hours ago
    Downloads
    609

    #totto2727/x

    Focused MoonBit utility packages for bounded and heterogeneous collections, logical copying, validated filesystem paths, JSON flattening, and JSON conversions for YAML and TOML values.

    #Usage

    Choose the checked workflow that matches the utility task:

    • any_collection reads values of different types from the same map through typed references.
    • copy creates an independent mutable copy while leaving the original value unchanged.
    • ring_buffer retains the newest values in a fixed-capacity FIFO collection.
    • path resolves and normalizes an absolute and relative filesystem path.
    • json flattens a nested document and reconstructs the original structure.
    • yaml preserves nested configuration values through YAML-backed JSON conversion.
    • toml parses a structured TOML configuration into nested JSON.

    #Key features

    • any_collection provides mutable and persistent maps with the same typed reference API.
    • copy defines independent logical-copy behavior for built-in and downstream value types.
    • ring_buffer provides bounded FIFO storage with logical-order traversal.
    • path separates normalized absolute and relative filesystem paths.
    • json flattens and reconstructs Json values with JSON Pointer or JavaScript paths.
    • yaml and toml provide owned wrappers for standard JSON conversion traits.

    #Prerequisites

    • MoonBit: Use moon 0.1.20261117 or a compatible stable toolchain.

    #Setup

    1. Add the module to your MoonBit project.

    moon add totto2727/x

    1. Add only the selected package entry inside the consumer package's import { ... } declaration in moon.pkg.

    Packagemoon.pkg entry
    any_collection"totto2727/x/any_collection" @any_collection
    copy"totto2727/x/copy" @x_copy
    ring_buffer"totto2727/x/ring_buffer" @x_ring_buffer
    path"totto2727/x/path" @x_path
    json"totto2727/x/json" @x_json
    yaml"totto2727/x/yaml" @x_yaml
    toml"totto2727/x/toml" @x_toml

    #API

    Mooncakes provides the canonical API reference for the published module and each package: any_collection, copy, ring_buffer, path, json, yaml, and toml.

    #Development

    For repository structure and development commands, see AGENTS.md.

    #License

    This README was generated from the share-artifact skill and README template.