urbit/pkg/arvo/lib/group-json.hoon
fang a539d986a7
various: move away from {type} syntax
In favor of [type] syntax.
Turns a bunch of ++ into +$ along the way.
2020-11-26 17:43:26 +01:00

19 lines
312 B
Plaintext

/- *group-store
|%
++ groups-to-json
|= grp=groups
^- json
=, enjs:format
%- pairs
%+ turn ~(tap by grp)
|= [pax=^path =group]
^- [@t json]
:- (spat pax)
(set-to-array group ship:enjs:format)
::
++ set-to-array
|* [a=(set) b=$-(* json)]
^- json
[%a (turn ~(tap in a) b)]
--