Skip to content

spinel_kit 0.2.0

Latest

Choose a tag to compare

@OriPekelman OriPekelman released this 08 Jun 22:48

Two new stdlib-surface shims, absorbed from duplication across tep + toy.

Added

  • SpinelKit::Hex — hex digit/byte codec: nibble (hex→0..15), nibble_char (0..15→uppercase hex), byte2 (byte→two lowercase hex chars), to_int (leading hex digits→int). The decode nibble was byte-identical across Tep::Url, Tep::Llm, and SpinelKit::Json's decoder.
  • SpinelKit::Url — the CGI/URI-component surface: escape/unescape (RFC 3986 percent-codec), parse_query (form-urlencoded→Hash), split_url (scheme/host/port/path/query). Ported from Tep::Url; uses SpinelKit::Hex; self-contained.

SpinelKit::Json keeps its own private hex helpers so a JSON-only consumer never compiles Hex (Spinel has no tree-shaking).

Verified: CRuby parity tests + Spinel compile clean (0 degrade warnings). RBS shipped for both.

gem install spinel_kit · https://rubygems.org/gems/spinel_kit · CHANGELOG