1
0
mirror of https://github.com/ilyakooo0/urbit.git synced 2024-12-21 13:51:50 +03:00
urbit/base/tree/json.hook
Galen Wolfe-Pauly 369dd1878a tree for editing
2015-05-08 16:47:46 -07:00

51 lines
996 B
Plaintext

::
/? 314
/= gas /$ fuel
/= ral /: /=home= /% /react-js/
/= pal /: /=home=
/; |= a=(map ,@ta cord) a
/% 2
/_ /react-js/
::
/= sal /: /=home=
/; |= a=(map ,@ta json) a
/% 2
/_ /react-snip-json/
::
::::
::
// /%%/util
::
[util=. +>]
::
!:
::::
::
^- json
=+ ~(. util gas)
:: .json?kids
?: (~(has by qix.gas) %kids)
%+ joba %kids
=. pal (~(del by pal) %md) :: XX haxor
=- [%a (turn (~(tap by pal)) -)]
|= [a=span b=cord]
%- jobe :~
name/s/a
body/s/b
==
:: .json?snip
?: (~(has by qix.gas) %snip)
%+ joba %snip
=. sal (~(del by sal) %md) :: XX haxor
=- [%a (turn (~(tap by sal)) -)]
|= [a=span b=json]
%- jobe :~
name/s/a
body/b
==
:: .json
%- jobe :~
kids/[%a (turn get-kids |=(a=span s/a))]
body/[%s ral]
==