mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
91f8049819
requires vere without crypto:ames
26 lines
589 B
Plaintext
26 lines
589 B
Plaintext
:: rewrite query string keys
|
|
::
|
|
:::: /hoon/hep-to-cab/lib
|
|
::
|
|
/? 310
|
|
::
|
|
:::: ~fyr
|
|
::
|
|
=< term
|
|
|%
|
|
++ gsub :: replace chars
|
|
|= {a/@t b/@t t/@t}
|
|
^- @t
|
|
?: =('' t) t
|
|
%+ mix (lsh 3 1 $(t (rsh 3 1 t)))
|
|
=+ c=(end 3 1 t)
|
|
?:(=(a c) b c)
|
|
::
|
|
++ term |=(a/^term (gsub '-' '_' a)) :: single atom
|
|
++ path |=(a/^path (turn a term)) :: path elements
|
|
++ quay :: query string keys
|
|
|= a/quay:eyre ^+ a
|
|
%+ turn a
|
|
|=({p/@t q/@t} [(term p) q])
|
|
--
|