mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 06:58:16 +03:00
Merge remote-tracking branch 'origin/lf/signed-js-parser' into philip/tomb
This commit is contained in:
commit
265ff532e7
@ -3495,6 +3495,14 @@
|
||||
|= jon=json
|
||||
?> ?=([%n *] jon)
|
||||
(rash p.jon dem)
|
||||
:: :: ++ns:dejs:format
|
||||
++ ns :: number as signed
|
||||
|= jon=json
|
||||
^- @s
|
||||
?> ?=([%n *] jon)
|
||||
%+ rash p.jon
|
||||
%+ cook new:si
|
||||
;~(plug ;~(pose (cold %| (jest '-')) (easy %&)) dem)
|
||||
:: :: ++no:dejs:format
|
||||
++ no :: number as cord
|
||||
|=(jon=json ?>(?=([%n *] jon) p.jon))
|
||||
|
@ -131,6 +131,7 @@
|
||||
++ nul `json`~
|
||||
++ tru `json`[%b &]
|
||||
++ num `json`[%n ~.12]
|
||||
++ neg `json`[%n '-3']
|
||||
++ str `json`[%s 'hey']
|
||||
++ frond `json`(frond:enjs 'foo' num)
|
||||
++ obj `json`(pairs:enjs ~[['foo' num] ['bar' str]])
|
||||
@ -228,6 +229,16 @@
|
||||
!> (ni num:ex)
|
||||
%- expect-fail
|
||||
|. (ni tru:ex)
|
||||
:: as @s
|
||||
::
|
||||
%+ expect-eq
|
||||
!> -3
|
||||
!> (ns neg:ex)
|
||||
%+ expect-eq
|
||||
!> --12
|
||||
!> (ns num:ex)
|
||||
%- expect-fail
|
||||
|. (ns tru:ex)
|
||||
:: as cord
|
||||
::
|
||||
%+ expect-eq
|
||||
|
Loading…
Reference in New Issue
Block a user