@port-labs/jq-node-bindings 0.0.13 → 0.0.15-dev1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/binding.gyp +41 -19
- package/configure +1 -1
- package/deps/jq/.gitattributes +12 -0
- package/deps/jq/AUTHORS +149 -43
- package/deps/jq/COPYING +75 -1
- package/deps/jq/ChangeLog +2 -2
- package/deps/jq/Makefile.am +106 -65
- package/deps/jq/NEWS.md +391 -0
- package/deps/jq/README.md +54 -52
- package/deps/jq/SECURITY.md +7 -0
- package/deps/jq/compile-ios.sh +106 -102
- package/deps/jq/configure.ac +72 -59
- package/deps/jq/docs/Pipfile +14 -0
- package/deps/jq/docs/Pipfile.lock +415 -0
- package/deps/jq/docs/README.md +15 -14
- package/deps/jq/docs/build_manpage.py +251 -0
- package/deps/jq/docs/build_mantests.py +21 -0
- package/deps/jq/docs/build_website.py +95 -0
- package/deps/jq/docs/content/download/default.yml +249 -0
- package/deps/jq/docs/content/index.yml +83 -0
- package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
- package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
- package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
- package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
- package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
- package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
- package/deps/jq/docs/content/tutorial/default.yml +337 -0
- package/deps/jq/docs/manual_schema.yml +60 -0
- package/deps/jq/docs/public/css/style.css +99 -0
- package/deps/jq/docs/public/icon.png +0 -0
- package/deps/jq/docs/public/icon.svg +1 -0
- package/deps/jq/docs/public/jq.svg +1 -0
- package/deps/jq/docs/public/js/manual-search.js +31 -49
- package/deps/jq/docs/templates/default.html.j2 +31 -0
- package/deps/jq/docs/templates/index.html.j2 +58 -0
- package/deps/jq/docs/templates/manual.html.j2 +120 -0
- package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
- package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
- package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
- package/deps/jq/docs/validate_manual_schema.py +19 -0
- package/deps/jq/jq.1.prebuilt +1102 -294
- package/deps/jq/jq.spec +2 -3
- package/deps/jq/libjq.pc.in +11 -0
- package/deps/jq/m4/ax_pthread.m4 +522 -0
- package/deps/jq/modules/oniguruma/.travis.yml +17 -0
- package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
- package/deps/jq/modules/oniguruma/COPYING +23 -25
- package/deps/jq/modules/oniguruma/HISTORY +368 -23
- package/deps/jq/modules/oniguruma/Makefile.am +61 -7
- package/deps/jq/modules/oniguruma/README +34 -20
- package/deps/jq/modules/oniguruma/README.md +106 -33
- package/deps/jq/modules/oniguruma/README_japanese +183 -0
- package/deps/jq/modules/oniguruma/autogen.sh +9 -0
- package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
- package/deps/jq/modules/oniguruma/configure.ac +66 -55
- package/deps/jq/modules/oniguruma/doc/API +485 -42
- package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
- package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
- package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
- package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
- package/deps/jq/modules/oniguruma/doc/RE +223 -63
- package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
- package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
- package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
- package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
- package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
- package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
- package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
- package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
- package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
- package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
- package/deps/jq/modules/oniguruma/index.html +16 -5
- package/deps/jq/modules/oniguruma/index_ja.html +16 -5
- package/deps/jq/modules/oniguruma/make_win.bat +5 -0
- package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
- package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
- package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
- package/deps/jq/modules/oniguruma/onig-config.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
- package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
- package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
- package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
- package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
- package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
- package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
- package/deps/jq/modules/oniguruma/sample/count.c +125 -0
- package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
- package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
- package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
- package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
- package/deps/jq/modules/oniguruma/sample/names.c +10 -6
- package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
- package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
- package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
- package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
- package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
- package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
- package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
- package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
- package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
- package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
- package/deps/jq/modules/oniguruma/src/big5.c +25 -15
- package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
- package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
- package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
- package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
- package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
- package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
- package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
- package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
- package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
- package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
- package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
- package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
- package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
- package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
- package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
- package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
- package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
- package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
- package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
- package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
- package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
- package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
- package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
- package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
- package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
- package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
- package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
- package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
- package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
- package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
- package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
- package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
- package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
- package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
- package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
- package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
- package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
- package/deps/jq/modules/oniguruma/src/regext.c +8 -8
- package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
- package/deps/jq/modules/oniguruma/src/regint.h +757 -491
- package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
- package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
- package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
- package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
- package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
- package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
- package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
- package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
- package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
- package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
- package/deps/jq/modules/oniguruma/src/st.c +248 -249
- package/deps/jq/modules/oniguruma/src/st.h +4 -5
- package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
- package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
- package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
- package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
- package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
- package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
- package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
- package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
- package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
- package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
- package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
- package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
- package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
- package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
- package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
- package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
- package/deps/jq/modules/oniguruma/test/test.sh +17 -0
- package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
- package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
- package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
- package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
- package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
- package/deps/jq/modules/oniguruma/test/testc.c +128 -88
- package/deps/jq/modules/oniguruma/test/testp.c +613 -0
- package/deps/jq/modules/oniguruma/test/testu.c +75 -28
- package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
- package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
- package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
- package/deps/jq/modules/oniguruma/tis.config +1336 -0
- package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
- package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
- package/deps/jq/scripts/update-website +6 -5
- package/deps/jq/scripts/version +10 -7
- package/deps/jq/sig/jq-release-new.key +29 -0
- package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
- package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
- package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
- package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
- package/deps/jq/src/builtin.c +537 -343
- package/deps/jq/src/builtin.h +18 -0
- package/deps/jq/src/builtin.jq +116 -143
- package/deps/jq/src/bytecode.h +8 -4
- package/deps/jq/src/compile.c +157 -143
- package/deps/jq/src/compile.h +3 -4
- package/deps/jq/src/decNumber/ICU-license.html +45 -0
- package/deps/jq/src/decNumber/decBasic.c +3908 -0
- package/deps/jq/src/decNumber/decCommon.c +1835 -0
- package/deps/jq/src/decNumber/decContext.c +437 -0
- package/deps/jq/src/decNumber/decContext.h +254 -0
- package/deps/jq/src/decNumber/decDPD.h +1185 -0
- package/deps/jq/src/decNumber/decDouble.c +140 -0
- package/deps/jq/src/decNumber/decDouble.h +155 -0
- package/deps/jq/src/decNumber/decNumber.c +8143 -0
- package/deps/jq/src/decNumber/decNumber.h +182 -0
- package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
- package/deps/jq/src/decNumber/decPacked.c +220 -0
- package/deps/jq/src/decNumber/decPacked.h +52 -0
- package/deps/jq/src/decNumber/decQuad.c +135 -0
- package/deps/jq/src/decNumber/decQuad.h +177 -0
- package/deps/jq/src/decNumber/decSingle.c +71 -0
- package/deps/jq/src/decNumber/decSingle.h +86 -0
- package/deps/jq/src/decNumber/decimal128.c +553 -0
- package/deps/jq/src/decNumber/decimal128.h +81 -0
- package/deps/jq/src/decNumber/decimal32.c +476 -0
- package/deps/jq/src/decNumber/decimal32.h +81 -0
- package/deps/jq/src/decNumber/decimal64.c +839 -0
- package/deps/jq/src/decNumber/decimal64.h +83 -0
- package/deps/jq/src/decNumber/decnumber.pdf +0 -0
- package/deps/jq/src/decNumber/example1.c +38 -0
- package/deps/jq/src/decNumber/example2.c +52 -0
- package/deps/jq/src/decNumber/example3.c +64 -0
- package/deps/jq/src/decNumber/example4.c +61 -0
- package/deps/jq/src/decNumber/example5.c +36 -0
- package/deps/jq/src/decNumber/example6.c +61 -0
- package/deps/jq/src/decNumber/example7.c +35 -0
- package/deps/jq/src/decNumber/example8.c +39 -0
- package/deps/jq/src/decNumber/readme.txt +81 -0
- package/deps/jq/src/exec_stack.h +5 -3
- package/deps/jq/src/execute.c +126 -44
- package/deps/jq/src/inject_errors.c +0 -2
- package/deps/jq/src/jq.h +10 -1
- package/deps/jq/src/jq_test.c +222 -11
- package/deps/jq/src/jv.c +807 -176
- package/deps/jq/src/jv.h +22 -1
- package/deps/jq/src/jv_alloc.c +33 -26
- package/deps/jq/src/jv_alloc.h +0 -11
- package/deps/jq/src/jv_aux.c +153 -67
- package/deps/jq/src/jv_dtoa.c +12 -2
- package/deps/jq/src/jv_dtoa_tsd.c +51 -0
- package/deps/jq/src/jv_dtoa_tsd.h +4 -0
- package/deps/jq/src/jv_parse.c +70 -15
- package/deps/jq/src/jv_print.c +56 -60
- package/deps/jq/src/jv_private.h +7 -0
- package/deps/jq/src/jv_thread.h +76 -0
- package/deps/jq/src/jv_unicode.c +18 -0
- package/deps/jq/src/jv_unicode.h +2 -0
- package/deps/jq/src/lexer.c +782 -543
- package/deps/jq/src/lexer.h +438 -64
- package/deps/jq/src/lexer.l +10 -3
- package/deps/jq/src/libm.h +16 -6
- package/deps/jq/src/linker.c +97 -40
- package/deps/jq/src/locfile.c +2 -1
- package/deps/jq/src/main.c +384 -336
- package/deps/jq/src/opcode_list.h +5 -2
- package/deps/jq/src/parser.c +2260 -1898
- package/deps/jq/src/parser.h +115 -98
- package/deps/jq/src/parser.y +124 -89
- package/deps/jq/src/util.c +854 -55
- package/deps/jq/src/util.h +6 -4
- package/deps/jq/tests/jq.test +762 -26
- package/deps/jq/tests/jq_fuzz_compile.c +27 -0
- package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
- package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
- package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
- package/deps/jq/tests/jq_fuzz_parse.c +21 -0
- package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
- package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
- package/deps/jq/tests/local.supp +14 -0
- package/deps/jq/tests/man.test +979 -0
- package/deps/jq/tests/manonig.test +76 -0
- package/deps/jq/tests/manonigtest +5 -0
- package/deps/jq/tests/mantest +1 -2
- package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
- package/deps/jq/tests/modules/shadow1.jq +2 -0
- package/deps/jq/tests/modules/shadow2.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
- package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
- package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
- package/deps/jq/tests/no-main-program.jq +1 -0
- package/deps/jq/tests/onig.test +77 -2
- package/deps/jq/tests/setup +7 -2
- package/deps/jq/tests/shtest +478 -59
- package/deps/jq/tests/uri.test +38 -0
- package/deps/jq/tests/uritest +5 -0
- package/deps/jq/tests/yes-main-program.jq +2 -0
- package/lib/index.js +3 -0
- package/lib/jq.js +15 -1
- package/lib/templateAsync.js +137 -0
- package/package.json +7 -7
- package/src/binding.cc +623 -146
- package/src/binding.h +3 -4
- package/test/santiy-async.test.js +171 -0
- package/test/santiy.test.js +2 -2
- package/test/template-async.test.js +182 -0
- package/test/template.test.js +3 -3
- package/deps/jq/.travis.yml +0 -202
- package/deps/jq/NEWS +0 -89
- package/deps/jq/appveyor.yml +0 -53
- package/deps/jq/docs/Gemfile +0 -7
- package/deps/jq/docs/Gemfile.lock +0 -63
- package/deps/jq/docs/Rakefile +0 -24
- package/deps/jq/docs/Rakefile.manual +0 -49
- package/deps/jq/docs/Rakefile.website +0 -76
- package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
- package/deps/jq/docs/content/2.download/default.yml +0 -193
- package/deps/jq/docs/content/index/index.yml +0 -73
- package/deps/jq/docs/public/css/base.scss +0 -181
- package/deps/jq/docs/public/jq.png +0 -0
- package/deps/jq/docs/site.yml +0 -9
- package/deps/jq/docs/templates/default.liquid +0 -34
- package/deps/jq/docs/templates/index.liquid +0 -73
- package/deps/jq/docs/templates/manual.liquid +0 -99
- package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
- package/deps/jq/docs/templates/shared/_head.liquid +0 -17
- package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
- package/deps/jq/modules/oniguruma/README.ja +0 -195
- package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
- package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
- package/deps/jq/modules/oniguruma/dist.info +0 -10
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
- package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
- /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
- /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
|
@@ -0,0 +1,979 @@
|
|
|
1
|
+
.
|
|
2
|
+
"Hello, world!"
|
|
3
|
+
"Hello, world!"
|
|
4
|
+
|
|
5
|
+
.
|
|
6
|
+
0.12345678901234567890123456789
|
|
7
|
+
0.12345678901234567890123456789
|
|
8
|
+
|
|
9
|
+
[., tojson] | . == if have_decnum then [12345678909876543212345,"12345678909876543212345"] else [12345678909876543000000,"12345678909876543000000"] end
|
|
10
|
+
12345678909876543212345
|
|
11
|
+
true
|
|
12
|
+
|
|
13
|
+
. < 0.12345678901234567890123456788
|
|
14
|
+
0.12345678901234567890123456789
|
|
15
|
+
false
|
|
16
|
+
|
|
17
|
+
map([., . == 1]) | tojson | . == if have_decnum then "[[1,true],[1.000,true],[1.0,true],[1.00,true]]" else "[[1,true],[1,true],[1,true],[1,true]]" end
|
|
18
|
+
[1, 1.000, 1.0, 100e-2]
|
|
19
|
+
true
|
|
20
|
+
|
|
21
|
+
. as $big | [$big, $big + 1] | map(. > 10000000000000000000000000000000) | . == if have_decnum then [true, false] else [false, false] end
|
|
22
|
+
10000000000000000000000000000001
|
|
23
|
+
true
|
|
24
|
+
|
|
25
|
+
.foo
|
|
26
|
+
{"foo": 42, "bar": "less interesting data"}
|
|
27
|
+
42
|
|
28
|
+
|
|
29
|
+
.foo
|
|
30
|
+
{"notfoo": true, "alsonotfoo": false}
|
|
31
|
+
null
|
|
32
|
+
|
|
33
|
+
.["foo"]
|
|
34
|
+
{"foo": 42}
|
|
35
|
+
42
|
|
36
|
+
|
|
37
|
+
.foo?
|
|
38
|
+
{"foo": 42, "bar": "less interesting data"}
|
|
39
|
+
42
|
|
40
|
+
|
|
41
|
+
.foo?
|
|
42
|
+
{"notfoo": true, "alsonotfoo": false}
|
|
43
|
+
null
|
|
44
|
+
|
|
45
|
+
.["foo"]?
|
|
46
|
+
{"foo": 42}
|
|
47
|
+
42
|
|
48
|
+
|
|
49
|
+
[.foo?]
|
|
50
|
+
[1,2]
|
|
51
|
+
[]
|
|
52
|
+
|
|
53
|
+
.[0]
|
|
54
|
+
[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]
|
|
55
|
+
{"name":"JSON", "good":true}
|
|
56
|
+
|
|
57
|
+
.[2]
|
|
58
|
+
[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]
|
|
59
|
+
null
|
|
60
|
+
|
|
61
|
+
.[-2]
|
|
62
|
+
[1,2,3]
|
|
63
|
+
2
|
|
64
|
+
|
|
65
|
+
.[2:4]
|
|
66
|
+
["a","b","c","d","e"]
|
|
67
|
+
["c", "d"]
|
|
68
|
+
|
|
69
|
+
.[2:4]
|
|
70
|
+
"abcdefghi"
|
|
71
|
+
"cd"
|
|
72
|
+
|
|
73
|
+
.[:3]
|
|
74
|
+
["a","b","c","d","e"]
|
|
75
|
+
["a", "b", "c"]
|
|
76
|
+
|
|
77
|
+
.[-2:]
|
|
78
|
+
["a","b","c","d","e"]
|
|
79
|
+
["d", "e"]
|
|
80
|
+
|
|
81
|
+
.[]
|
|
82
|
+
[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]
|
|
83
|
+
{"name":"JSON", "good":true}
|
|
84
|
+
{"name":"XML", "good":false}
|
|
85
|
+
|
|
86
|
+
.[]
|
|
87
|
+
[]
|
|
88
|
+
|
|
89
|
+
.foo[]
|
|
90
|
+
{"foo":[1,2,3]}
|
|
91
|
+
1
|
|
92
|
+
2
|
|
93
|
+
3
|
|
94
|
+
|
|
95
|
+
.[]
|
|
96
|
+
{"a": 1, "b": 1}
|
|
97
|
+
1
|
|
98
|
+
1
|
|
99
|
+
|
|
100
|
+
.foo, .bar
|
|
101
|
+
{"foo": 42, "bar": "something else", "baz": true}
|
|
102
|
+
42
|
|
103
|
+
"something else"
|
|
104
|
+
|
|
105
|
+
.user, .projects[]
|
|
106
|
+
{"user":"stedolan", "projects": ["jq", "wikiflow"]}
|
|
107
|
+
"stedolan"
|
|
108
|
+
"jq"
|
|
109
|
+
"wikiflow"
|
|
110
|
+
|
|
111
|
+
.[4,2]
|
|
112
|
+
["a","b","c","d","e"]
|
|
113
|
+
"e"
|
|
114
|
+
"c"
|
|
115
|
+
|
|
116
|
+
.[] | .name
|
|
117
|
+
[{"name":"JSON", "good":true}, {"name":"XML", "good":false}]
|
|
118
|
+
"JSON"
|
|
119
|
+
"XML"
|
|
120
|
+
|
|
121
|
+
(. + 2) * 5
|
|
122
|
+
1
|
|
123
|
+
15
|
|
124
|
+
|
|
125
|
+
[.user, .projects[]]
|
|
126
|
+
{"user":"stedolan", "projects": ["jq", "wikiflow"]}
|
|
127
|
+
["stedolan", "jq", "wikiflow"]
|
|
128
|
+
|
|
129
|
+
[ .[] | . * 2]
|
|
130
|
+
[1, 2, 3]
|
|
131
|
+
[2, 4, 6]
|
|
132
|
+
|
|
133
|
+
{user, title: .titles[]}
|
|
134
|
+
{"user":"stedolan","titles":["JQ Primer", "More JQ"]}
|
|
135
|
+
{"user":"stedolan", "title": "JQ Primer"}
|
|
136
|
+
{"user":"stedolan", "title": "More JQ"}
|
|
137
|
+
|
|
138
|
+
{(.user): .titles}
|
|
139
|
+
{"user":"stedolan","titles":["JQ Primer", "More JQ"]}
|
|
140
|
+
{"stedolan": ["JQ Primer", "More JQ"]}
|
|
141
|
+
|
|
142
|
+
.. | .a?
|
|
143
|
+
[[{"a":1}]]
|
|
144
|
+
1
|
|
145
|
+
|
|
146
|
+
.a + 1
|
|
147
|
+
{"a": 7}
|
|
148
|
+
8
|
|
149
|
+
|
|
150
|
+
.a + .b
|
|
151
|
+
{"a": [1,2], "b": [3,4]}
|
|
152
|
+
[1,2,3,4]
|
|
153
|
+
|
|
154
|
+
.a + null
|
|
155
|
+
{"a": 1}
|
|
156
|
+
1
|
|
157
|
+
|
|
158
|
+
.a + 1
|
|
159
|
+
{}
|
|
160
|
+
1
|
|
161
|
+
|
|
162
|
+
{a: 1} + {b: 2} + {c: 3} + {a: 42}
|
|
163
|
+
null
|
|
164
|
+
{"a": 42, "b": 2, "c": 3}
|
|
165
|
+
|
|
166
|
+
4 - .a
|
|
167
|
+
{"a":3}
|
|
168
|
+
1
|
|
169
|
+
|
|
170
|
+
. - ["xml", "yaml"]
|
|
171
|
+
["xml", "yaml", "json"]
|
|
172
|
+
["json"]
|
|
173
|
+
|
|
174
|
+
10 / . * 3
|
|
175
|
+
5
|
|
176
|
+
6
|
|
177
|
+
|
|
178
|
+
. / ", "
|
|
179
|
+
"a, b,c,d, e"
|
|
180
|
+
["a","b,c,d","e"]
|
|
181
|
+
|
|
182
|
+
{"k": {"a": 1, "b": 2}} * {"k": {"a": 0,"c": 3}}
|
|
183
|
+
null
|
|
184
|
+
{"k": {"a": 0, "b": 2, "c": 3}}
|
|
185
|
+
|
|
186
|
+
.[] | (1 / .)?
|
|
187
|
+
[1,0,-1]
|
|
188
|
+
1
|
|
189
|
+
-1
|
|
190
|
+
|
|
191
|
+
map(abs)
|
|
192
|
+
[-10, -1.1, -1e-1]
|
|
193
|
+
[10,1.1,1e-1]
|
|
194
|
+
|
|
195
|
+
.[] | length
|
|
196
|
+
[[1,2], "string", {"a":2}, null, -5]
|
|
197
|
+
2
|
|
198
|
+
6
|
|
199
|
+
1
|
|
200
|
+
0
|
|
201
|
+
5
|
|
202
|
+
|
|
203
|
+
utf8bytelength
|
|
204
|
+
"\u03bc"
|
|
205
|
+
2
|
|
206
|
+
|
|
207
|
+
keys
|
|
208
|
+
{"abc": 1, "abcd": 2, "Foo": 3}
|
|
209
|
+
["Foo", "abc", "abcd"]
|
|
210
|
+
|
|
211
|
+
keys
|
|
212
|
+
[42,3,35]
|
|
213
|
+
[0,1,2]
|
|
214
|
+
|
|
215
|
+
map(has("foo"))
|
|
216
|
+
[{"foo": 42}, {}]
|
|
217
|
+
[true, false]
|
|
218
|
+
|
|
219
|
+
map(has(2))
|
|
220
|
+
[[0,1], ["a","b","c"]]
|
|
221
|
+
[false, true]
|
|
222
|
+
|
|
223
|
+
.[] | in({"foo": 42})
|
|
224
|
+
["foo", "bar"]
|
|
225
|
+
true
|
|
226
|
+
false
|
|
227
|
+
|
|
228
|
+
map(in([0,1]))
|
|
229
|
+
[2, 0]
|
|
230
|
+
[false, true]
|
|
231
|
+
|
|
232
|
+
map(.+1)
|
|
233
|
+
[1,2,3]
|
|
234
|
+
[2,3,4]
|
|
235
|
+
|
|
236
|
+
map_values(.+1)
|
|
237
|
+
{"a": 1, "b": 2, "c": 3}
|
|
238
|
+
{"a": 2, "b": 3, "c": 4}
|
|
239
|
+
|
|
240
|
+
map(., .)
|
|
241
|
+
[1,2]
|
|
242
|
+
[1,1,2,2]
|
|
243
|
+
|
|
244
|
+
map_values(. // empty)
|
|
245
|
+
{"a": null, "b": true, "c": false}
|
|
246
|
+
{"b":true}
|
|
247
|
+
|
|
248
|
+
pick(.a, .b.c, .x)
|
|
249
|
+
{"a": 1, "b": {"c": 2, "d": 3}, "e": 4}
|
|
250
|
+
{"a":1,"b":{"c":2},"x":null}
|
|
251
|
+
|
|
252
|
+
pick(.[2], .[0], .[0])
|
|
253
|
+
[1,2,3,4]
|
|
254
|
+
[1,null,3]
|
|
255
|
+
|
|
256
|
+
path(.a[0].b)
|
|
257
|
+
null
|
|
258
|
+
["a",0,"b"]
|
|
259
|
+
|
|
260
|
+
[path(..)]
|
|
261
|
+
{"a":[{"b":1}]}
|
|
262
|
+
[[],["a"],["a",0],["a",0,"b"]]
|
|
263
|
+
|
|
264
|
+
del(.foo)
|
|
265
|
+
{"foo": 42, "bar": 9001, "baz": 42}
|
|
266
|
+
{"bar": 9001, "baz": 42}
|
|
267
|
+
|
|
268
|
+
del(.[1, 2])
|
|
269
|
+
["foo", "bar", "baz"]
|
|
270
|
+
["foo"]
|
|
271
|
+
|
|
272
|
+
getpath(["a","b"])
|
|
273
|
+
null
|
|
274
|
+
null
|
|
275
|
+
|
|
276
|
+
[getpath(["a","b"], ["a","c"])]
|
|
277
|
+
{"a":{"b":0, "c":1}}
|
|
278
|
+
[0, 1]
|
|
279
|
+
|
|
280
|
+
setpath(["a","b"]; 1)
|
|
281
|
+
null
|
|
282
|
+
{"a": {"b": 1}}
|
|
283
|
+
|
|
284
|
+
setpath(["a","b"]; 1)
|
|
285
|
+
{"a":{"b":0}}
|
|
286
|
+
{"a": {"b": 1}}
|
|
287
|
+
|
|
288
|
+
setpath([0,"a"]; 1)
|
|
289
|
+
null
|
|
290
|
+
[{"a":1}]
|
|
291
|
+
|
|
292
|
+
delpaths([["a","b"]])
|
|
293
|
+
{"a":{"b":1},"x":{"y":2}}
|
|
294
|
+
{"a":{},"x":{"y":2}}
|
|
295
|
+
|
|
296
|
+
to_entries
|
|
297
|
+
{"a": 1, "b": 2}
|
|
298
|
+
[{"key":"a", "value":1}, {"key":"b", "value":2}]
|
|
299
|
+
|
|
300
|
+
from_entries
|
|
301
|
+
[{"key":"a", "value":1}, {"key":"b", "value":2}]
|
|
302
|
+
{"a": 1, "b": 2}
|
|
303
|
+
|
|
304
|
+
with_entries(.key |= "KEY_" + .)
|
|
305
|
+
{"a": 1, "b": 2}
|
|
306
|
+
{"KEY_a": 1, "KEY_b": 2}
|
|
307
|
+
|
|
308
|
+
map(select(. >= 2))
|
|
309
|
+
[1,5,3,0,7]
|
|
310
|
+
[5,3,7]
|
|
311
|
+
|
|
312
|
+
.[] | select(.id == "second")
|
|
313
|
+
[{"id": "first", "val": 1}, {"id": "second", "val": 2}]
|
|
314
|
+
{"id": "second", "val": 2}
|
|
315
|
+
|
|
316
|
+
.[]|numbers
|
|
317
|
+
[[],{},1,"foo",null,true,false]
|
|
318
|
+
1
|
|
319
|
+
|
|
320
|
+
1, empty, 2
|
|
321
|
+
null
|
|
322
|
+
1
|
|
323
|
+
2
|
|
324
|
+
|
|
325
|
+
[1,2,empty,3]
|
|
326
|
+
null
|
|
327
|
+
[1,2,3]
|
|
328
|
+
|
|
329
|
+
try error catch .
|
|
330
|
+
"error message"
|
|
331
|
+
"error message"
|
|
332
|
+
|
|
333
|
+
try error("invalid value: \(.)") catch .
|
|
334
|
+
42
|
|
335
|
+
"invalid value: 42"
|
|
336
|
+
|
|
337
|
+
try error("\($__loc__)") catch .
|
|
338
|
+
null
|
|
339
|
+
"{\"file\":\"<top-level>\",\"line\":1}"
|
|
340
|
+
|
|
341
|
+
[paths]
|
|
342
|
+
[1,[[],{"a":2}]]
|
|
343
|
+
[[0],[1],[1,0],[1,1],[1,1,"a"]]
|
|
344
|
+
|
|
345
|
+
[paths(type == "number")]
|
|
346
|
+
[1,[[],{"a":2}]]
|
|
347
|
+
[[0],[1,1,"a"]]
|
|
348
|
+
|
|
349
|
+
add
|
|
350
|
+
["a","b","c"]
|
|
351
|
+
"abc"
|
|
352
|
+
|
|
353
|
+
add
|
|
354
|
+
[1, 2, 3]
|
|
355
|
+
6
|
|
356
|
+
|
|
357
|
+
add
|
|
358
|
+
[]
|
|
359
|
+
null
|
|
360
|
+
|
|
361
|
+
add(.[].a)
|
|
362
|
+
[{"a":3}, {"a":5}, {"b":6}]
|
|
363
|
+
8
|
|
364
|
+
|
|
365
|
+
any
|
|
366
|
+
[true, false]
|
|
367
|
+
true
|
|
368
|
+
|
|
369
|
+
any
|
|
370
|
+
[false, false]
|
|
371
|
+
false
|
|
372
|
+
|
|
373
|
+
any
|
|
374
|
+
[]
|
|
375
|
+
false
|
|
376
|
+
|
|
377
|
+
all
|
|
378
|
+
[true, false]
|
|
379
|
+
false
|
|
380
|
+
|
|
381
|
+
all
|
|
382
|
+
[true, true]
|
|
383
|
+
true
|
|
384
|
+
|
|
385
|
+
all
|
|
386
|
+
[]
|
|
387
|
+
true
|
|
388
|
+
|
|
389
|
+
flatten
|
|
390
|
+
[1, [2], [[3]]]
|
|
391
|
+
[1, 2, 3]
|
|
392
|
+
|
|
393
|
+
flatten(1)
|
|
394
|
+
[1, [2], [[3]]]
|
|
395
|
+
[1, 2, [3]]
|
|
396
|
+
|
|
397
|
+
flatten
|
|
398
|
+
[[]]
|
|
399
|
+
[]
|
|
400
|
+
|
|
401
|
+
flatten
|
|
402
|
+
[{"foo": "bar"}, [{"foo": "baz"}]]
|
|
403
|
+
[{"foo": "bar"}, {"foo": "baz"}]
|
|
404
|
+
|
|
405
|
+
range(2; 4)
|
|
406
|
+
null
|
|
407
|
+
2
|
|
408
|
+
3
|
|
409
|
+
|
|
410
|
+
[range(2; 4)]
|
|
411
|
+
null
|
|
412
|
+
[2,3]
|
|
413
|
+
|
|
414
|
+
[range(4)]
|
|
415
|
+
null
|
|
416
|
+
[0,1,2,3]
|
|
417
|
+
|
|
418
|
+
[range(0; 10; 3)]
|
|
419
|
+
null
|
|
420
|
+
[0,3,6,9]
|
|
421
|
+
|
|
422
|
+
[range(0; 10; -1)]
|
|
423
|
+
null
|
|
424
|
+
[]
|
|
425
|
+
|
|
426
|
+
[range(0; -5; -1)]
|
|
427
|
+
null
|
|
428
|
+
[0,-1,-2,-3,-4]
|
|
429
|
+
|
|
430
|
+
floor
|
|
431
|
+
3.14159
|
|
432
|
+
3
|
|
433
|
+
|
|
434
|
+
sqrt
|
|
435
|
+
9
|
|
436
|
+
3
|
|
437
|
+
|
|
438
|
+
.[] | tonumber
|
|
439
|
+
[1, "1"]
|
|
440
|
+
1
|
|
441
|
+
1
|
|
442
|
+
|
|
443
|
+
.[] | tostring
|
|
444
|
+
[1, "1", [1]]
|
|
445
|
+
"1"
|
|
446
|
+
"1"
|
|
447
|
+
"[1]"
|
|
448
|
+
|
|
449
|
+
map(type)
|
|
450
|
+
[0, false, [], {}, null, "hello"]
|
|
451
|
+
["number", "boolean", "array", "object", "null", "string"]
|
|
452
|
+
|
|
453
|
+
.[] | (infinite * .) < 0
|
|
454
|
+
[-1, 1]
|
|
455
|
+
true
|
|
456
|
+
false
|
|
457
|
+
|
|
458
|
+
infinite, nan | type
|
|
459
|
+
null
|
|
460
|
+
"number"
|
|
461
|
+
"number"
|
|
462
|
+
|
|
463
|
+
sort
|
|
464
|
+
[8,3,null,6]
|
|
465
|
+
[null,3,6,8]
|
|
466
|
+
|
|
467
|
+
sort_by(.foo)
|
|
468
|
+
[{"foo":4, "bar":10}, {"foo":3, "bar":10}, {"foo":2, "bar":1}]
|
|
469
|
+
[{"foo":2, "bar":1}, {"foo":3, "bar":10}, {"foo":4, "bar":10}]
|
|
470
|
+
|
|
471
|
+
sort_by(.foo, .bar)
|
|
472
|
+
[{"foo":4, "bar":10}, {"foo":3, "bar":20}, {"foo":2, "bar":1}, {"foo":3, "bar":10}]
|
|
473
|
+
[{"foo":2, "bar":1}, {"foo":3, "bar":10}, {"foo":3, "bar":20}, {"foo":4, "bar":10}]
|
|
474
|
+
|
|
475
|
+
group_by(.foo)
|
|
476
|
+
[{"foo":1, "bar":10}, {"foo":3, "bar":100}, {"foo":1, "bar":1}]
|
|
477
|
+
[[{"foo":1, "bar":10}, {"foo":1, "bar":1}], [{"foo":3, "bar":100}]]
|
|
478
|
+
|
|
479
|
+
min
|
|
480
|
+
[5,4,2,7]
|
|
481
|
+
2
|
|
482
|
+
|
|
483
|
+
max_by(.foo)
|
|
484
|
+
[{"foo":1, "bar":14}, {"foo":2, "bar":3}]
|
|
485
|
+
{"foo":2, "bar":3}
|
|
486
|
+
|
|
487
|
+
unique
|
|
488
|
+
[1,2,5,3,5,3,1,3]
|
|
489
|
+
[1,2,3,5]
|
|
490
|
+
|
|
491
|
+
unique_by(.foo)
|
|
492
|
+
[{"foo": 1, "bar": 2}, {"foo": 1, "bar": 3}, {"foo": 4, "bar": 5}]
|
|
493
|
+
[{"foo": 1, "bar": 2}, {"foo": 4, "bar": 5}]
|
|
494
|
+
|
|
495
|
+
unique_by(length)
|
|
496
|
+
["chunky", "bacon", "kitten", "cicada", "asparagus"]
|
|
497
|
+
["bacon", "chunky", "asparagus"]
|
|
498
|
+
|
|
499
|
+
reverse
|
|
500
|
+
[1,2,3,4]
|
|
501
|
+
[4,3,2,1]
|
|
502
|
+
|
|
503
|
+
contains("bar")
|
|
504
|
+
"foobar"
|
|
505
|
+
true
|
|
506
|
+
|
|
507
|
+
contains(["baz", "bar"])
|
|
508
|
+
["foobar", "foobaz", "blarp"]
|
|
509
|
+
true
|
|
510
|
+
|
|
511
|
+
contains(["bazzzzz", "bar"])
|
|
512
|
+
["foobar", "foobaz", "blarp"]
|
|
513
|
+
false
|
|
514
|
+
|
|
515
|
+
contains({foo: 12, bar: [{barp: 12}]})
|
|
516
|
+
{"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]}
|
|
517
|
+
true
|
|
518
|
+
|
|
519
|
+
contains({foo: 12, bar: [{barp: 15}]})
|
|
520
|
+
{"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]}
|
|
521
|
+
false
|
|
522
|
+
|
|
523
|
+
indices(", ")
|
|
524
|
+
"a,b, cd, efg, hijk"
|
|
525
|
+
[3,7,12]
|
|
526
|
+
|
|
527
|
+
indices(1)
|
|
528
|
+
[0,1,2,1,3,1,4]
|
|
529
|
+
[1,3,5]
|
|
530
|
+
|
|
531
|
+
indices([1,2])
|
|
532
|
+
[0,1,2,3,1,4,2,5,1,2,6,7]
|
|
533
|
+
[1,8]
|
|
534
|
+
|
|
535
|
+
index(", ")
|
|
536
|
+
"a,b, cd, efg, hijk"
|
|
537
|
+
3
|
|
538
|
+
|
|
539
|
+
index(1)
|
|
540
|
+
[0,1,2,1,3,1,4]
|
|
541
|
+
1
|
|
542
|
+
|
|
543
|
+
index([1,2])
|
|
544
|
+
[0,1,2,3,1,4,2,5,1,2,6,7]
|
|
545
|
+
1
|
|
546
|
+
|
|
547
|
+
rindex(", ")
|
|
548
|
+
"a,b, cd, efg, hijk"
|
|
549
|
+
12
|
|
550
|
+
|
|
551
|
+
rindex(1)
|
|
552
|
+
[0,1,2,1,3,1,4]
|
|
553
|
+
5
|
|
554
|
+
|
|
555
|
+
rindex([1,2])
|
|
556
|
+
[0,1,2,3,1,4,2,5,1,2,6,7]
|
|
557
|
+
8
|
|
558
|
+
|
|
559
|
+
inside("foobar")
|
|
560
|
+
"bar"
|
|
561
|
+
true
|
|
562
|
+
|
|
563
|
+
inside(["foobar", "foobaz", "blarp"])
|
|
564
|
+
["baz", "bar"]
|
|
565
|
+
true
|
|
566
|
+
|
|
567
|
+
inside(["foobar", "foobaz", "blarp"])
|
|
568
|
+
["bazzzzz", "bar"]
|
|
569
|
+
false
|
|
570
|
+
|
|
571
|
+
inside({"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]})
|
|
572
|
+
{"foo": 12, "bar": [{"barp": 12}]}
|
|
573
|
+
true
|
|
574
|
+
|
|
575
|
+
inside({"foo": 12, "bar":[1,2,{"barp":12, "blip":13}]})
|
|
576
|
+
{"foo": 12, "bar": [{"barp": 15}]}
|
|
577
|
+
false
|
|
578
|
+
|
|
579
|
+
[.[]|startswith("foo")]
|
|
580
|
+
["fo", "foo", "barfoo", "foobar", "barfoob"]
|
|
581
|
+
[false, true, false, true, false]
|
|
582
|
+
|
|
583
|
+
[.[]|endswith("foo")]
|
|
584
|
+
["foobar", "barfoo"]
|
|
585
|
+
[false, true]
|
|
586
|
+
|
|
587
|
+
combinations
|
|
588
|
+
[[1,2], [3, 4]]
|
|
589
|
+
[1, 3]
|
|
590
|
+
[1, 4]
|
|
591
|
+
[2, 3]
|
|
592
|
+
[2, 4]
|
|
593
|
+
|
|
594
|
+
combinations(2)
|
|
595
|
+
[0, 1]
|
|
596
|
+
[0, 0]
|
|
597
|
+
[0, 1]
|
|
598
|
+
[1, 0]
|
|
599
|
+
[1, 1]
|
|
600
|
+
|
|
601
|
+
[.[]|ltrimstr("foo")]
|
|
602
|
+
["fo", "foo", "barfoo", "foobar", "afoo"]
|
|
603
|
+
["fo","","barfoo","bar","afoo"]
|
|
604
|
+
|
|
605
|
+
[.[]|rtrimstr("foo")]
|
|
606
|
+
["fo", "foo", "barfoo", "foobar", "foob"]
|
|
607
|
+
["fo","","bar","foobar","foob"]
|
|
608
|
+
|
|
609
|
+
trim, ltrim, rtrim
|
|
610
|
+
" abc "
|
|
611
|
+
"abc"
|
|
612
|
+
"abc "
|
|
613
|
+
" abc"
|
|
614
|
+
|
|
615
|
+
explode
|
|
616
|
+
"foobar"
|
|
617
|
+
[102,111,111,98,97,114]
|
|
618
|
+
|
|
619
|
+
implode
|
|
620
|
+
[65, 66, 67]
|
|
621
|
+
"ABC"
|
|
622
|
+
|
|
623
|
+
join(", ")
|
|
624
|
+
["a","b,c,d","e"]
|
|
625
|
+
"a, b,c,d, e"
|
|
626
|
+
|
|
627
|
+
join(" ")
|
|
628
|
+
["a",1,2.3,true,null,false]
|
|
629
|
+
"a 1 2.3 true false"
|
|
630
|
+
|
|
631
|
+
ascii_upcase
|
|
632
|
+
"useful but not for é"
|
|
633
|
+
"USEFUL BUT NOT FOR é"
|
|
634
|
+
|
|
635
|
+
[while(.<100; .*2)]
|
|
636
|
+
1
|
|
637
|
+
[1,2,4,8,16,32,64]
|
|
638
|
+
|
|
639
|
+
[repeat(.*2, error)?]
|
|
640
|
+
1
|
|
641
|
+
[2]
|
|
642
|
+
|
|
643
|
+
[.,1]|until(.[0] < 1; [.[0] - 1, .[1] * .[0]])|.[1]
|
|
644
|
+
4
|
|
645
|
+
24
|
|
646
|
+
|
|
647
|
+
recurse(.foo[])
|
|
648
|
+
{"foo":[{"foo": []}, {"foo":[{"foo":[]}]}]}
|
|
649
|
+
{"foo":[{"foo":[]},{"foo":[{"foo":[]}]}]}
|
|
650
|
+
{"foo":[]}
|
|
651
|
+
{"foo":[{"foo":[]}]}
|
|
652
|
+
{"foo":[]}
|
|
653
|
+
|
|
654
|
+
recurse
|
|
655
|
+
{"a":0,"b":[1]}
|
|
656
|
+
{"a":0,"b":[1]}
|
|
657
|
+
0
|
|
658
|
+
[1]
|
|
659
|
+
1
|
|
660
|
+
|
|
661
|
+
recurse(. * .; . < 20)
|
|
662
|
+
2
|
|
663
|
+
2
|
|
664
|
+
4
|
|
665
|
+
16
|
|
666
|
+
|
|
667
|
+
walk(if type == "array" then sort else . end)
|
|
668
|
+
[[4, 1, 7], [8, 5, 2], [3, 6, 9]]
|
|
669
|
+
[[1,4,7],[2,5,8],[3,6,9]]
|
|
670
|
+
|
|
671
|
+
$ENV.PAGER
|
|
672
|
+
null
|
|
673
|
+
"less"
|
|
674
|
+
|
|
675
|
+
env.PAGER
|
|
676
|
+
null
|
|
677
|
+
"less"
|
|
678
|
+
|
|
679
|
+
transpose
|
|
680
|
+
[[1], [2,3]]
|
|
681
|
+
[[1,2],[null,3]]
|
|
682
|
+
|
|
683
|
+
bsearch(0)
|
|
684
|
+
[0,1]
|
|
685
|
+
0
|
|
686
|
+
|
|
687
|
+
bsearch(0)
|
|
688
|
+
[1,2,3]
|
|
689
|
+
-1
|
|
690
|
+
|
|
691
|
+
bsearch(4) as $ix | if $ix < 0 then .[-(1+$ix)] = 4 else . end
|
|
692
|
+
[1,2,3]
|
|
693
|
+
[1,2,3,4]
|
|
694
|
+
|
|
695
|
+
"The input was \(.), which is one less than \(.+1)"
|
|
696
|
+
42
|
|
697
|
+
"The input was 42, which is one less than 43"
|
|
698
|
+
|
|
699
|
+
[.[]|tostring]
|
|
700
|
+
[1, "foo", ["foo"]]
|
|
701
|
+
["1","foo","[\"foo\"]"]
|
|
702
|
+
|
|
703
|
+
[.[]|tojson]
|
|
704
|
+
[1, "foo", ["foo"]]
|
|
705
|
+
["1","\"foo\"","[\"foo\"]"]
|
|
706
|
+
|
|
707
|
+
[.[]|tojson|fromjson]
|
|
708
|
+
[1, "foo", ["foo"]]
|
|
709
|
+
[1,"foo",["foo"]]
|
|
710
|
+
|
|
711
|
+
@html
|
|
712
|
+
"This works if x < y"
|
|
713
|
+
"This works if x < y"
|
|
714
|
+
|
|
715
|
+
@sh "echo \(.)"
|
|
716
|
+
"O'Hara's Ale"
|
|
717
|
+
"echo 'O'\\''Hara'\\''s Ale'"
|
|
718
|
+
|
|
719
|
+
@base64
|
|
720
|
+
"This is a message"
|
|
721
|
+
"VGhpcyBpcyBhIG1lc3NhZ2U="
|
|
722
|
+
|
|
723
|
+
@base64d
|
|
724
|
+
"VGhpcyBpcyBhIG1lc3NhZ2U="
|
|
725
|
+
"This is a message"
|
|
726
|
+
|
|
727
|
+
fromdate
|
|
728
|
+
"2015-03-05T23:51:47Z"
|
|
729
|
+
1425599507
|
|
730
|
+
|
|
731
|
+
strptime("%Y-%m-%dT%H:%M:%SZ")
|
|
732
|
+
"2015-03-05T23:51:47Z"
|
|
733
|
+
[2015,2,5,23,51,47,4,63]
|
|
734
|
+
|
|
735
|
+
strptime("%Y-%m-%dT%H:%M:%SZ")|mktime
|
|
736
|
+
"2015-03-05T23:51:47Z"
|
|
737
|
+
1425599507
|
|
738
|
+
|
|
739
|
+
. == false
|
|
740
|
+
null
|
|
741
|
+
false
|
|
742
|
+
|
|
743
|
+
. == {"b": {"d": (4 + 1e-20), "c": 3}, "a":1}
|
|
744
|
+
{"a":1, "b": {"c": 3, "d": 4}}
|
|
745
|
+
true
|
|
746
|
+
|
|
747
|
+
.[] == 1
|
|
748
|
+
[1, 1.0, "1", "banana"]
|
|
749
|
+
true
|
|
750
|
+
true
|
|
751
|
+
false
|
|
752
|
+
false
|
|
753
|
+
|
|
754
|
+
if . == 0 then "zero" elif . == 1 then "one" else "many" end
|
|
755
|
+
2
|
|
756
|
+
"many"
|
|
757
|
+
|
|
758
|
+
. < 5
|
|
759
|
+
2
|
|
760
|
+
true
|
|
761
|
+
|
|
762
|
+
42 and "a string"
|
|
763
|
+
null
|
|
764
|
+
true
|
|
765
|
+
|
|
766
|
+
(true, false) or false
|
|
767
|
+
null
|
|
768
|
+
true
|
|
769
|
+
false
|
|
770
|
+
|
|
771
|
+
(true, true) and (true, false)
|
|
772
|
+
null
|
|
773
|
+
true
|
|
774
|
+
false
|
|
775
|
+
true
|
|
776
|
+
false
|
|
777
|
+
|
|
778
|
+
[true, false | not]
|
|
779
|
+
null
|
|
780
|
+
[false, true]
|
|
781
|
+
|
|
782
|
+
empty // 42
|
|
783
|
+
null
|
|
784
|
+
42
|
|
785
|
+
|
|
786
|
+
.foo // 42
|
|
787
|
+
{"foo": 19}
|
|
788
|
+
19
|
|
789
|
+
|
|
790
|
+
.foo // 42
|
|
791
|
+
{}
|
|
792
|
+
42
|
|
793
|
+
|
|
794
|
+
(false, null, 1) // 42
|
|
795
|
+
null
|
|
796
|
+
1
|
|
797
|
+
|
|
798
|
+
(false, null, 1) | . // 42
|
|
799
|
+
null
|
|
800
|
+
42
|
|
801
|
+
42
|
|
802
|
+
1
|
|
803
|
+
|
|
804
|
+
try .a catch ". is not an object"
|
|
805
|
+
true
|
|
806
|
+
". is not an object"
|
|
807
|
+
|
|
808
|
+
[.[]|try .a]
|
|
809
|
+
[{}, true, {"a":1}]
|
|
810
|
+
[null, 1]
|
|
811
|
+
|
|
812
|
+
try error("some exception") catch .
|
|
813
|
+
true
|
|
814
|
+
"some exception"
|
|
815
|
+
|
|
816
|
+
[.[] | .a?]
|
|
817
|
+
[{}, true, {"a":1}]
|
|
818
|
+
[null, 1]
|
|
819
|
+
|
|
820
|
+
[.[] | tonumber?]
|
|
821
|
+
["1", "invalid", "3", 4]
|
|
822
|
+
[1, 3, 4]
|
|
823
|
+
|
|
824
|
+
.bar as $x | .foo | . + $x
|
|
825
|
+
{"foo":10, "bar":200}
|
|
826
|
+
210
|
|
827
|
+
|
|
828
|
+
. as $i|[(.*2|. as $i| $i), $i]
|
|
829
|
+
5
|
|
830
|
+
[10,5]
|
|
831
|
+
|
|
832
|
+
. as [$a, $b, {c: $c}] | $a + $b + $c
|
|
833
|
+
[2, 3, {"c": 4, "d": 5}]
|
|
834
|
+
9
|
|
835
|
+
|
|
836
|
+
.[] as [$a, $b] | {a: $a, b: $b}
|
|
837
|
+
[[0], [0, 1], [2, 1, 0]]
|
|
838
|
+
{"a":0,"b":null}
|
|
839
|
+
{"a":0,"b":1}
|
|
840
|
+
{"a":2,"b":1}
|
|
841
|
+
|
|
842
|
+
.[] as {$a, $b, c: {$d, $e}} ?// {$a, $b, c: [{$d, $e}]} | {$a, $b, $d, $e}
|
|
843
|
+
[{"a": 1, "b": 2, "c": {"d": 3, "e": 4}}, {"a": 1, "b": 2, "c": [{"d": 3, "e": 4}]}]
|
|
844
|
+
{"a":1,"b":2,"d":3,"e":4}
|
|
845
|
+
{"a":1,"b":2,"d":3,"e":4}
|
|
846
|
+
|
|
847
|
+
.[] as {$a, $b, c: {$d}} ?// {$a, $b, c: [{$e}]} | {$a, $b, $d, $e}
|
|
848
|
+
[{"a": 1, "b": 2, "c": {"d": 3, "e": 4}}, {"a": 1, "b": 2, "c": [{"d": 3, "e": 4}]}]
|
|
849
|
+
{"a":1,"b":2,"d":3,"e":null}
|
|
850
|
+
{"a":1,"b":2,"d":null,"e":4}
|
|
851
|
+
|
|
852
|
+
.[] as [$a] ?// [$b] | if $a != null then error("err: \($a)") else {$a,$b} end
|
|
853
|
+
[[3]]
|
|
854
|
+
{"a":null,"b":3}
|
|
855
|
+
|
|
856
|
+
def addvalue(f): . + [f]; map(addvalue(.[0]))
|
|
857
|
+
[[1,2],[10,20]]
|
|
858
|
+
[[1,2,1], [10,20,10]]
|
|
859
|
+
|
|
860
|
+
def addvalue(f): f as $x | map(. + $x); addvalue(.[0])
|
|
861
|
+
[[1,2],[10,20]]
|
|
862
|
+
[[1,2,1,2], [10,20,1,2]]
|
|
863
|
+
|
|
864
|
+
isempty(empty)
|
|
865
|
+
null
|
|
866
|
+
true
|
|
867
|
+
|
|
868
|
+
isempty(.[])
|
|
869
|
+
[]
|
|
870
|
+
true
|
|
871
|
+
|
|
872
|
+
isempty(.[])
|
|
873
|
+
[1,2,3]
|
|
874
|
+
false
|
|
875
|
+
|
|
876
|
+
[limit(3; .[])]
|
|
877
|
+
[0,1,2,3,4,5,6,7,8,9]
|
|
878
|
+
[0,1,2]
|
|
879
|
+
|
|
880
|
+
[skip(3; .[])]
|
|
881
|
+
[0,1,2,3,4,5,6,7,8,9]
|
|
882
|
+
[3,4,5,6,7,8,9]
|
|
883
|
+
|
|
884
|
+
[first(range(.)), last(range(.)), nth(5; range(.))]
|
|
885
|
+
10
|
|
886
|
+
[0,9,5]
|
|
887
|
+
|
|
888
|
+
[first(empty), last(empty), nth(5; empty)]
|
|
889
|
+
null
|
|
890
|
+
[]
|
|
891
|
+
|
|
892
|
+
[range(.)]|[first, last, nth(5)]
|
|
893
|
+
10
|
|
894
|
+
[0,9,5]
|
|
895
|
+
|
|
896
|
+
reduce .[] as $item (0; . + $item)
|
|
897
|
+
[1,2,3,4,5]
|
|
898
|
+
15
|
|
899
|
+
|
|
900
|
+
reduce .[] as [$i,$j] (0; . + $i * $j)
|
|
901
|
+
[[1,2],[3,4],[5,6]]
|
|
902
|
+
44
|
|
903
|
+
|
|
904
|
+
reduce .[] as {$x,$y} (null; .x += $x | .y += [$y])
|
|
905
|
+
[{"x":"a","y":1},{"x":"b","y":2},{"x":"c","y":3}]
|
|
906
|
+
{"x":"abc","y":[1,2,3]}
|
|
907
|
+
|
|
908
|
+
foreach .[] as $item (0; . + $item)
|
|
909
|
+
[1,2,3,4,5]
|
|
910
|
+
1
|
|
911
|
+
3
|
|
912
|
+
6
|
|
913
|
+
10
|
|
914
|
+
15
|
|
915
|
+
|
|
916
|
+
foreach .[] as $item (0; . + $item; [$item, . * 2])
|
|
917
|
+
[1,2,3,4,5]
|
|
918
|
+
[1,2]
|
|
919
|
+
[2,6]
|
|
920
|
+
[3,12]
|
|
921
|
+
[4,20]
|
|
922
|
+
[5,30]
|
|
923
|
+
|
|
924
|
+
foreach .[] as $item (0; . + 1; {index: ., $item})
|
|
925
|
+
["foo", "bar", "baz"]
|
|
926
|
+
{"index":1,"item":"foo"}
|
|
927
|
+
{"index":2,"item":"bar"}
|
|
928
|
+
{"index":3,"item":"baz"}
|
|
929
|
+
|
|
930
|
+
def range(init; upto; by): def _range: if (by > 0 and . < upto) or (by < 0 and . > upto) then ., ((.+by)|_range) else . end; if by == 0 then init else init|_range end | select((by > 0 and . < upto) or (by < 0 and . > upto)); range(0; 10; 3)
|
|
931
|
+
null
|
|
932
|
+
0
|
|
933
|
+
3
|
|
934
|
+
6
|
|
935
|
+
9
|
|
936
|
+
|
|
937
|
+
def while(cond; update): def _while: if cond then ., (update | _while) else empty end; _while; [while(.<100; .*2)]
|
|
938
|
+
1
|
|
939
|
+
[1,2,4,8,16,32,64]
|
|
940
|
+
|
|
941
|
+
truncate_stream([[0],1],[[1,0],2],[[1,0]],[[1]])
|
|
942
|
+
1
|
|
943
|
+
[[0],2]
|
|
944
|
+
[[0]]
|
|
945
|
+
|
|
946
|
+
fromstream(1|truncate_stream([[0],1],[[1,0],2],[[1,0]],[[1]]))
|
|
947
|
+
null
|
|
948
|
+
[2]
|
|
949
|
+
|
|
950
|
+
. as $dot|fromstream($dot|tostream)|.==$dot
|
|
951
|
+
[0,[1,{"a":1},{"b":2}]]
|
|
952
|
+
true
|
|
953
|
+
|
|
954
|
+
(..|select(type=="boolean")) |= if . then 1 else 0 end
|
|
955
|
+
[true,false,[5,true,[true,[false]],false]]
|
|
956
|
+
[1,0,[5,1,[1,[0]],0]]
|
|
957
|
+
|
|
958
|
+
.foo += 1
|
|
959
|
+
{"foo": 42}
|
|
960
|
+
{"foo": 43}
|
|
961
|
+
|
|
962
|
+
.a = .b
|
|
963
|
+
{"a": {"b": 10}, "b": 20}
|
|
964
|
+
{"a":20,"b":20}
|
|
965
|
+
|
|
966
|
+
.a |= .b
|
|
967
|
+
{"a": {"b": 10}, "b": 20}
|
|
968
|
+
{"a":10,"b":20}
|
|
969
|
+
|
|
970
|
+
(.a, .b) = range(3)
|
|
971
|
+
null
|
|
972
|
+
{"a":0,"b":0}
|
|
973
|
+
{"a":1,"b":1}
|
|
974
|
+
{"a":2,"b":2}
|
|
975
|
+
|
|
976
|
+
(.a, .b) |= range(3)
|
|
977
|
+
null
|
|
978
|
+
{"a":0,"b":0}
|
|
979
|
+
|