urbit/base/tree/json.hook

51 lines
987 B
Plaintext
Raw Normal View History

2015-02-18 06:03:21 +03:00
::
/? 314
/= gas /$ fuel
2015-06-05 23:32:29 +03:00
/= ral /: /=== /% /react-js/
/= pal /: /===
2015-02-18 06:03:21 +03:00
/; |= a=(map ,@ta cord) a
/% 2
/_ /react-js/
::
2015-06-05 23:32:29 +03:00
/= sal /: /===
2015-04-23 03:43:52 +03:00
/; |= a=(map ,@ta json) a
2015-02-18 06:03:21 +03:00
/% 2
2015-04-23 03:43:52 +03:00
/_ /react-snip-json/
2015-02-18 06:03:21 +03:00
::
::::
::
// /%%/util
::
[util=. +>]
::
!:
::::
::
^- json
=+ ~(. util gas)
2015-04-23 03:43:52 +03:00
:: .json?kids
2015-02-18 06:03:21 +03:00
?: (~(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
==
2015-04-23 03:43:52 +03:00
:: .json?snip
2015-02-18 06:03:21 +03:00
?: (~(has by qix.gas) %snip)
%+ joba %snip
=. sal (~(del by sal) %md) :: XX haxor
=- [%a (turn (~(tap by sal)) -)]
2015-04-23 03:43:52 +03:00
|= [a=span b=json]
2015-02-18 06:03:21 +03:00
%- jobe :~
name/s/a
2015-04-23 03:43:52 +03:00
body/b
2015-02-18 06:03:21 +03:00
==
2015-04-23 03:43:52 +03:00
:: .json
2015-02-18 06:03:21 +03:00
%- jobe :~
kids/[%a (turn get-kids |=(a=span s/a))]
body/[%s ral]
==