zuse: added path, tank, string utils to en/dejs

This commit is contained in:
Logan Allen 2019-09-24 15:31:14 -07:00 committed by Jared Tobin
parent b330fb4a8d
commit 166465af59
No known key found for this signature in database
GPG Key ID: 0E4647D58F8A69E4
3 changed files with 27 additions and 10 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:85de6b4640a1dddeda908e6d111e2f6139447d376db3bdb4573f5bc370ddce82
size 15756068
oid sha256:6205835e39ce2a3f995c042ac3b46a34e492c464db20b6e7604b08b828744215
size 15831246

View File

@ -62,13 +62,8 @@
=- (pairs (turn ~(tap by a) -))
|* {k/* v/*} [(b k) (c v)]
::
++ lank ::: tank as string arr
|= a/tank
^- json
a+(turn (wash [0 80] a) tape)
::
++ dank ::: tank
|= a/tank
|= a=^tank
?: ?=($leaf -.a) (frond %leaf (tape p.a))
:: TODO: No idea what a plum is, but it was recently added
::
@ -325,7 +320,7 @@
%- pairs
?- -.a
$lin ~[pat+b+pat.a msg+s+msg.a]
$exp ~[exp+s+exp.a res+a+(turn res.a lank)]
$exp ~[exp+s+exp.a res+a+(turn res.a tank)]
$ire ~[top+s+(scot %uv top.a) sep+(spec sep.a)] ::TODO @uv as number?
$fat ~[tac+(atta tac.a) sep+(spec sep.a)]
$inv ~[inv+b+inv.a cir+(circ cir.a)]
@ -339,7 +334,7 @@
?- -.a
$name (pairs nom+s+nom.a tac+(atta tac.a) ~)
$text s+(of-wain:format +.a)
$tank a+(turn +.a lank)
$tank a+(turn +.a tank)
==
::
::: ||

View File

@ -5493,6 +5493,16 @@
|= a/^time
=- (numb (div (mul - 1.000) ~s1))
(add (div ~s1 2.000) (sub a ~1970.1.1))
:: :: ++path:enjs:format
++ path :: string from path
|= a=^path
^- json
[%s (spat a)]
:: :: ++tank:enjs:format
++ tank :: tank as string arr
|= a=^tank
^- json
[%a (turn (wash [0 80] a) tape)]
-- ::enjs
:: :: ++dejs:format
++ dejs :: json reparser
@ -5506,6 +5516,10 @@
|= jon/json ^- (list _(wit *json))
?> ?=({$a *} jon)
(turn p.jon wit)
:: :: ++as:dejs:format
++ as :: array as set
|* a=fist
(cu ~(gas in *(set _$:a)) (ar a))
:: :: ++at:dejs:format
++ at :: array as tuple
|* wil/(pole fist)
@ -5630,6 +5644,9 @@
|* {a/cord b/*}
=> .(+< [a b]=+<)
[(rash a fel) b]
:: :: ++pa:dejs:format
++ pa :: string as path
(su ;~(pfix net (more net urs:ab)))
:: :: ++pe:dejs:format
++ pe :: prefix
|* {pre/* wit/fist}
@ -5637,6 +5654,11 @@
:: :: ++sa:dejs:format
++ sa :: string as tape
|=(jon/json ?>(?=({$s *} jon) (trip p.jon)))
:: :: ++se:dejs:format
++ se :: string as aura
|= aur=@tas
|= jon=json
?>(?=([%s *] jon) (slav aur p.jon))
:: :: ++so:dejs:format
++ so :: string as cord
|=(jon/json ?>(?=({$s *} jon) p.jon))