@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.
Files changed (453) hide show
  1. package/README.md +6 -1
  2. package/binding.gyp +41 -19
  3. package/configure +1 -1
  4. package/deps/jq/.gitattributes +12 -0
  5. package/deps/jq/AUTHORS +149 -43
  6. package/deps/jq/COPYING +75 -1
  7. package/deps/jq/ChangeLog +2 -2
  8. package/deps/jq/Makefile.am +106 -65
  9. package/deps/jq/NEWS.md +391 -0
  10. package/deps/jq/README.md +54 -52
  11. package/deps/jq/SECURITY.md +7 -0
  12. package/deps/jq/compile-ios.sh +106 -102
  13. package/deps/jq/configure.ac +72 -59
  14. package/deps/jq/docs/Pipfile +14 -0
  15. package/deps/jq/docs/Pipfile.lock +415 -0
  16. package/deps/jq/docs/README.md +15 -14
  17. package/deps/jq/docs/build_manpage.py +251 -0
  18. package/deps/jq/docs/build_mantests.py +21 -0
  19. package/deps/jq/docs/build_website.py +95 -0
  20. package/deps/jq/docs/content/download/default.yml +249 -0
  21. package/deps/jq/docs/content/index.yml +83 -0
  22. package/deps/jq/docs/content/{3.manual/v1.6 → manual/dev}/manual.yml +992 -452
  23. package/deps/jq/docs/content/{3.manual → manual}/v1.3/manual.yml +105 -116
  24. package/deps/jq/docs/content/{3.manual → manual}/v1.4/manual.yml +122 -129
  25. package/deps/jq/docs/content/{3.manual → manual}/v1.5/manual.yml +313 -262
  26. package/deps/jq/docs/content/{3.manual → manual/v1.6}/manual.yml +407 -332
  27. package/deps/jq/docs/content/manual/v1.7/manual.yml +3697 -0
  28. package/deps/jq/docs/content/tutorial/default.yml +337 -0
  29. package/deps/jq/docs/manual_schema.yml +60 -0
  30. package/deps/jq/docs/public/css/style.css +99 -0
  31. package/deps/jq/docs/public/icon.png +0 -0
  32. package/deps/jq/docs/public/icon.svg +1 -0
  33. package/deps/jq/docs/public/jq.svg +1 -0
  34. package/deps/jq/docs/public/js/manual-search.js +31 -49
  35. package/deps/jq/docs/templates/default.html.j2 +31 -0
  36. package/deps/jq/docs/templates/index.html.j2 +58 -0
  37. package/deps/jq/docs/templates/manual.html.j2 +120 -0
  38. package/deps/jq/docs/templates/shared/_footer.html.j2 +14 -0
  39. package/deps/jq/docs/templates/shared/_head.html.j2 +23 -0
  40. package/deps/jq/docs/templates/shared/_navbar.html.j2 +40 -0
  41. package/deps/jq/docs/validate_manual_schema.py +19 -0
  42. package/deps/jq/jq.1.prebuilt +1102 -294
  43. package/deps/jq/jq.spec +2 -3
  44. package/deps/jq/libjq.pc.in +11 -0
  45. package/deps/jq/m4/ax_pthread.m4 +522 -0
  46. package/deps/jq/modules/oniguruma/.travis.yml +17 -0
  47. package/deps/jq/modules/oniguruma/CMakeLists.txt +206 -41
  48. package/deps/jq/modules/oniguruma/COPYING +23 -25
  49. package/deps/jq/modules/oniguruma/HISTORY +368 -23
  50. package/deps/jq/modules/oniguruma/Makefile.am +61 -7
  51. package/deps/jq/modules/oniguruma/README +34 -20
  52. package/deps/jq/modules/oniguruma/README.md +106 -33
  53. package/deps/jq/modules/oniguruma/README_japanese +183 -0
  54. package/deps/jq/modules/oniguruma/autogen.sh +9 -0
  55. package/deps/jq/modules/oniguruma/cmake/Config.cmake.in +4 -0
  56. package/deps/jq/modules/oniguruma/configure.ac +66 -55
  57. package/deps/jq/modules/oniguruma/doc/API +485 -42
  58. package/deps/jq/modules/oniguruma/doc/API.ja +732 -293
  59. package/deps/jq/modules/oniguruma/doc/CALLOUTS.API +397 -0
  60. package/deps/jq/modules/oniguruma/doc/CALLOUTS.API.ja +393 -0
  61. package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN +95 -0
  62. package/deps/jq/modules/oniguruma/doc/CALLOUTS.BUILTIN.ja +93 -0
  63. package/deps/jq/modules/oniguruma/doc/FAQ +3 -3
  64. package/deps/jq/modules/oniguruma/doc/FAQ.ja +8 -8
  65. package/deps/jq/modules/oniguruma/doc/RE +223 -63
  66. package/deps/jq/modules/oniguruma/doc/RE.ja +420 -265
  67. package/deps/jq/modules/oniguruma/doc/SYNTAX.md +1091 -0
  68. package/deps/jq/modules/oniguruma/doc/UNICODE_PROPERTIES +840 -697
  69. package/deps/jq/modules/oniguruma/harnesses/ascii_compatible.dict +113 -0
  70. package/deps/jq/modules/oniguruma/harnesses/base.c +749 -0
  71. package/deps/jq/modules/oniguruma/harnesses/deluxe.c +206 -0
  72. package/deps/jq/modules/oniguruma/harnesses/dict_conv.py +72 -0
  73. package/deps/jq/modules/oniguruma/harnesses/fuzzer.options +2 -0
  74. package/deps/jq/modules/oniguruma/harnesses/libfuzzer-onig.cpp +45 -0
  75. package/deps/jq/modules/oniguruma/harnesses/regset.c +392 -0
  76. package/deps/jq/modules/oniguruma/index.html +16 -5
  77. package/deps/jq/modules/oniguruma/index_ja.html +16 -5
  78. package/deps/jq/modules/oniguruma/make_win.bat +5 -0
  79. package/deps/jq/modules/oniguruma/make_win32.bat +5 -3
  80. package/deps/jq/modules/oniguruma/make_win64.bat +5 -3
  81. package/deps/jq/modules/oniguruma/onig-config.cmake.in +80 -0
  82. package/deps/jq/modules/oniguruma/onig-config.in +1 -1
  83. package/deps/jq/modules/oniguruma/oniguruma.pc.cmake.in +1 -1
  84. package/deps/jq/modules/oniguruma/oniguruma.pc.in +0 -1
  85. package/deps/jq/modules/oniguruma/sample/CMakeLists.txt +9 -2
  86. package/deps/jq/modules/oniguruma/sample/Makefile.am +24 -5
  87. package/deps/jq/modules/oniguruma/sample/bug_fix.c +13 -51
  88. package/deps/jq/modules/oniguruma/sample/callback_each_match.c +168 -0
  89. package/deps/jq/modules/oniguruma/sample/callout.c +268 -0
  90. package/deps/jq/modules/oniguruma/sample/count.c +125 -0
  91. package/deps/jq/modules/oniguruma/sample/crnl.c +6 -4
  92. package/deps/jq/modules/oniguruma/sample/echo.c +136 -0
  93. package/deps/jq/modules/oniguruma/sample/encode.c +53 -146
  94. package/deps/jq/modules/oniguruma/sample/listcap.c +18 -10
  95. package/deps/jq/modules/oniguruma/sample/names.c +10 -6
  96. package/deps/jq/modules/oniguruma/sample/posix.c +13 -2
  97. package/deps/jq/modules/oniguruma/sample/regset.c +95 -0
  98. package/deps/jq/modules/oniguruma/sample/scan.c +20 -6
  99. package/deps/jq/modules/oniguruma/sample/simple.c +8 -4
  100. package/deps/jq/modules/oniguruma/sample/sql.c +13 -8
  101. package/deps/jq/modules/oniguruma/sample/syntax.c +11 -10
  102. package/deps/jq/modules/oniguruma/sample/user_property.c +12 -7
  103. package/deps/jq/modules/oniguruma/src/Makefile.am +41 -15
  104. package/deps/jq/modules/oniguruma/src/Makefile.windows +196 -183
  105. package/deps/jq/modules/oniguruma/src/ascii.c +64 -7
  106. package/deps/jq/modules/oniguruma/src/big5.c +25 -15
  107. package/deps/jq/modules/oniguruma/src/config.h.cmake.in +7 -22
  108. package/deps/jq/modules/oniguruma/src/config.h.win32 +56 -84
  109. package/deps/jq/modules/oniguruma/src/config.h.win64 +56 -84
  110. package/deps/jq/modules/oniguruma/src/config.h.windows.in +62 -0
  111. package/deps/jq/modules/oniguruma/src/cp1251.c +14 -8
  112. package/deps/jq/modules/oniguruma/src/euc_jp.c +28 -30
  113. package/deps/jq/modules/oniguruma/src/euc_jp_prop.c +25 -32
  114. package/deps/jq/modules/oniguruma/src/euc_jp_prop.gperf +1 -2
  115. package/deps/jq/modules/oniguruma/src/euc_kr.c +27 -15
  116. package/deps/jq/modules/oniguruma/src/euc_tw.c +40 -17
  117. package/deps/jq/modules/oniguruma/src/gb18030.c +177 -119
  118. package/deps/jq/modules/oniguruma/src/gperf_fold_key_conv.py +12 -8
  119. package/deps/jq/modules/oniguruma/src/gperf_unfold_key_conv.py +8 -6
  120. package/deps/jq/modules/oniguruma/src/iso8859_1.c +92 -91
  121. package/deps/jq/modules/oniguruma/src/iso8859_10.c +13 -29
  122. package/deps/jq/modules/oniguruma/src/iso8859_11.c +4 -2
  123. package/deps/jq/modules/oniguruma/src/iso8859_13.c +13 -33
  124. package/deps/jq/modules/oniguruma/src/iso8859_14.c +13 -30
  125. package/deps/jq/modules/oniguruma/src/iso8859_15.c +13 -34
  126. package/deps/jq/modules/oniguruma/src/iso8859_16.c +13 -29
  127. package/deps/jq/modules/oniguruma/src/iso8859_2.c +13 -29
  128. package/deps/jq/modules/oniguruma/src/iso8859_3.c +13 -33
  129. package/deps/jq/modules/oniguruma/src/iso8859_4.c +13 -32
  130. package/deps/jq/modules/oniguruma/src/iso8859_5.c +16 -23
  131. package/deps/jq/modules/oniguruma/src/iso8859_6.c +4 -2
  132. package/deps/jq/modules/oniguruma/src/iso8859_7.c +14 -29
  133. package/deps/jq/modules/oniguruma/src/iso8859_8.c +4 -2
  134. package/deps/jq/modules/oniguruma/src/iso8859_9.c +13 -33
  135. package/deps/jq/modules/oniguruma/src/koi8.c +14 -27
  136. package/deps/jq/modules/oniguruma/src/koi8_r.c +12 -19
  137. package/deps/jq/modules/oniguruma/src/make_property.sh +21 -0
  138. package/deps/jq/modules/oniguruma/src/make_unicode_egcb.sh +7 -0
  139. package/deps/jq/modules/oniguruma/src/make_unicode_egcb_data.py +267 -0
  140. package/deps/jq/modules/oniguruma/src/make_unicode_fold.sh +25 -11
  141. package/deps/jq/modules/oniguruma/src/make_unicode_fold_data.py +206 -26
  142. package/deps/jq/modules/oniguruma/src/make_unicode_property.sh +19 -10
  143. package/deps/jq/modules/oniguruma/src/make_unicode_property_data.py +474 -375
  144. package/deps/jq/modules/oniguruma/src/make_unicode_wb.sh +7 -0
  145. package/deps/jq/modules/oniguruma/src/make_unicode_wb_data.py +267 -0
  146. package/deps/jq/modules/oniguruma/src/mktable.c +28 -24
  147. package/deps/jq/modules/oniguruma/src/onig_init.c +2 -2
  148. package/deps/jq/modules/oniguruma/src/oniggnu.h +7 -5
  149. package/deps/jq/modules/oniguruma/src/onigposix.h +40 -16
  150. package/deps/jq/modules/oniguruma/src/oniguruma.h +357 -107
  151. package/deps/jq/modules/oniguruma/src/regcomp.c +6214 -3933
  152. package/deps/jq/modules/oniguruma/src/regenc.c +197 -120
  153. package/deps/jq/modules/oniguruma/src/regenc.h +106 -63
  154. package/deps/jq/modules/oniguruma/src/regerror.c +112 -91
  155. package/deps/jq/modules/oniguruma/src/regexec.c +4876 -2010
  156. package/deps/jq/modules/oniguruma/src/regext.c +8 -8
  157. package/deps/jq/modules/oniguruma/src/reggnu.c +13 -17
  158. package/deps/jq/modules/oniguruma/src/regint.h +757 -491
  159. package/deps/jq/modules/oniguruma/src/regparse.c +7204 -3240
  160. package/deps/jq/modules/oniguruma/src/regparse.h +361 -218
  161. package/deps/jq/modules/oniguruma/src/regposerr.c +49 -9
  162. package/deps/jq/modules/oniguruma/src/regposix.c +106 -24
  163. package/deps/jq/modules/oniguruma/src/regsyntax.c +66 -13
  164. package/deps/jq/modules/oniguruma/src/regtrav.c +1 -1
  165. package/deps/jq/modules/oniguruma/src/regversion.c +6 -4
  166. package/deps/jq/modules/oniguruma/src/sjis.c +23 -52
  167. package/deps/jq/modules/oniguruma/src/sjis_prop.c +25 -32
  168. package/deps/jq/modules/oniguruma/src/sjis_prop.gperf +1 -2
  169. package/deps/jq/modules/oniguruma/src/st.c +248 -249
  170. package/deps/jq/modules/oniguruma/src/st.h +4 -5
  171. package/deps/jq/modules/oniguruma/src/unicode.c +869 -294
  172. package/deps/jq/modules/oniguruma/src/unicode_egcb_data.c +1419 -0
  173. package/deps/jq/modules/oniguruma/src/unicode_fold1_key.c +1829 -1300
  174. package/deps/jq/modules/oniguruma/src/unicode_fold2_key.c +32 -9
  175. package/deps/jq/modules/oniguruma/src/unicode_fold3_key.c +32 -9
  176. package/deps/jq/modules/oniguruma/src/unicode_fold_data.c +1210 -984
  177. package/deps/jq/modules/oniguruma/src/unicode_property_data.c +22480 -15198
  178. package/deps/jq/modules/oniguruma/src/unicode_property_data_posix.c +1463 -591
  179. package/deps/jq/modules/oniguruma/src/unicode_unfold_key.c +1958 -1418
  180. package/deps/jq/modules/oniguruma/src/unicode_wb_data.c +1106 -0
  181. package/deps/jq/modules/oniguruma/src/utf16_be.c +90 -49
  182. package/deps/jq/modules/oniguruma/src/utf16_le.c +80 -49
  183. package/deps/jq/modules/oniguruma/src/utf32_be.c +14 -42
  184. package/deps/jq/modules/oniguruma/src/utf32_le.c +13 -40
  185. package/deps/jq/modules/oniguruma/src/utf8.c +33 -78
  186. package/deps/jq/modules/oniguruma/test/CMakeLists.txt +55 -0
  187. package/deps/jq/modules/oniguruma/test/Makefile.am +65 -10
  188. package/deps/jq/modules/oniguruma/test/test.sh +17 -0
  189. package/deps/jq/modules/oniguruma/test/test_back.c +1450 -0
  190. package/deps/jq/modules/oniguruma/test/test_options.c +228 -0
  191. package/deps/jq/modules/oniguruma/test/test_regset.c +466 -0
  192. package/deps/jq/modules/oniguruma/test/test_syntax.c +365 -0
  193. package/deps/jq/modules/oniguruma/test/test_utf8.c +1761 -0
  194. package/deps/jq/modules/oniguruma/test/testc.c +128 -88
  195. package/deps/jq/modules/oniguruma/test/testp.c +613 -0
  196. package/deps/jq/modules/oniguruma/test/testu.c +75 -28
  197. package/deps/jq/modules/oniguruma/tis-ci/stub.c +3 -0
  198. package/deps/jq/modules/oniguruma/tis-ci/test_back.config +26 -0
  199. package/deps/jq/modules/oniguruma/tis-ci/test_regset.config +20 -0
  200. package/deps/jq/modules/oniguruma/tis-ci/test_syntax.config +26 -0
  201. package/deps/jq/modules/oniguruma/tis-ci/test_utf8.config +25 -0
  202. package/deps/jq/modules/oniguruma/tis-ci/testc.config +26 -0
  203. package/deps/jq/modules/oniguruma/tis-ci/testu.config +24 -0
  204. package/deps/jq/modules/oniguruma/tis.config +1336 -0
  205. package/deps/jq/modules/oniguruma/windows/CMakeLists.txt +8 -0
  206. package/deps/jq/modules/oniguruma/windows/testc.c +865 -869
  207. package/deps/jq/scripts/update-website +6 -5
  208. package/deps/jq/scripts/version +10 -7
  209. package/deps/jq/sig/jq-release-new.key +29 -0
  210. package/deps/jq/sig/v1.4/sha256sum.txt +1 -0
  211. package/deps/jq/sig/v1.5/sha256sum.txt +2 -0
  212. package/deps/jq/sig/v1.5rc1/sha256sum.txt +1 -0
  213. package/deps/jq/sig/v1.5rc2/sha256sum.txt +2 -0
  214. package/deps/jq/sig/v1.6/sha256sum.txt +2 -0
  215. package/deps/jq/sig/v1.7/jq-1.7.tar.gz.asc +16 -0
  216. package/deps/jq/sig/v1.7/jq-1.7.zip.asc +16 -0
  217. package/deps/jq/sig/v1.7/jq-linux-amd64.asc +16 -0
  218. package/deps/jq/sig/v1.7/jq-linux-arm64.asc +16 -0
  219. package/deps/jq/sig/v1.7/jq-linux-armel.asc +16 -0
  220. package/deps/jq/sig/v1.7/jq-linux-armhf.asc +16 -0
  221. package/deps/jq/sig/v1.7/jq-linux-i386.asc +16 -0
  222. package/deps/jq/sig/v1.7/jq-linux-mips.asc +16 -0
  223. package/deps/jq/sig/v1.7/jq-linux-mips64.asc +16 -0
  224. package/deps/jq/sig/v1.7/jq-linux-mips64el.asc +16 -0
  225. package/deps/jq/sig/v1.7/jq-linux-mips64r6.asc +16 -0
  226. package/deps/jq/sig/v1.7/jq-linux-mips64r6el.asc +16 -0
  227. package/deps/jq/sig/v1.7/jq-linux-mipsel.asc +16 -0
  228. package/deps/jq/sig/v1.7/jq-linux-mipsr6.asc +16 -0
  229. package/deps/jq/sig/v1.7/jq-linux-mipsr6el.asc +16 -0
  230. package/deps/jq/sig/v1.7/jq-linux-powerpc.asc +16 -0
  231. package/deps/jq/sig/v1.7/jq-linux-ppc64el.asc +16 -0
  232. package/deps/jq/sig/v1.7/jq-linux-riscv64.asc +16 -0
  233. package/deps/jq/sig/v1.7/jq-linux-s390x.asc +16 -0
  234. package/deps/jq/sig/v1.7/jq-macos-amd64.asc +16 -0
  235. package/deps/jq/sig/v1.7/jq-macos-arm64.asc +16 -0
  236. package/deps/jq/sig/v1.7/jq-windows-amd64.exe.asc +16 -0
  237. package/deps/jq/sig/v1.7/jq-windows-i386.exe.asc +16 -0
  238. package/deps/jq/sig/v1.7/sha256sum.txt +23 -0
  239. package/deps/jq/sig/v1.7.1/jq-1.7.1.tar.gz.asc +16 -0
  240. package/deps/jq/sig/v1.7.1/jq-1.7.1.zip.asc +16 -0
  241. package/deps/jq/sig/v1.7.1/jq-linux-amd64.asc +16 -0
  242. package/deps/jq/sig/v1.7.1/jq-linux-arm64.asc +16 -0
  243. package/deps/jq/sig/v1.7.1/jq-linux-armel.asc +16 -0
  244. package/deps/jq/sig/v1.7.1/jq-linux-armhf.asc +16 -0
  245. package/deps/jq/sig/v1.7.1/jq-linux-i386.asc +16 -0
  246. package/deps/jq/sig/v1.7.1/jq-linux-mips.asc +16 -0
  247. package/deps/jq/sig/v1.7.1/jq-linux-mips64.asc +16 -0
  248. package/deps/jq/sig/v1.7.1/jq-linux-mips64el.asc +16 -0
  249. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6.asc +16 -0
  250. package/deps/jq/sig/v1.7.1/jq-linux-mips64r6el.asc +16 -0
  251. package/deps/jq/sig/v1.7.1/jq-linux-mipsel.asc +16 -0
  252. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6.asc +16 -0
  253. package/deps/jq/sig/v1.7.1/jq-linux-mipsr6el.asc +16 -0
  254. package/deps/jq/sig/v1.7.1/jq-linux-powerpc.asc +16 -0
  255. package/deps/jq/sig/v1.7.1/jq-linux-ppc64el.asc +16 -0
  256. package/deps/jq/sig/v1.7.1/jq-linux-riscv64.asc +16 -0
  257. package/deps/jq/sig/v1.7.1/jq-linux-s390x.asc +16 -0
  258. package/deps/jq/sig/v1.7.1/jq-linux64.asc +16 -0
  259. package/deps/jq/sig/v1.7.1/jq-macos-amd64.asc +16 -0
  260. package/deps/jq/sig/v1.7.1/jq-macos-arm64.asc +16 -0
  261. package/deps/jq/sig/v1.7.1/jq-osx-amd64.asc +16 -0
  262. package/deps/jq/sig/v1.7.1/jq-win64.exe.asc +16 -0
  263. package/deps/jq/sig/v1.7.1/jq-windows-amd64.exe.asc +16 -0
  264. package/deps/jq/sig/v1.7.1/jq-windows-i386.exe.asc +16 -0
  265. package/deps/jq/sig/v1.7.1/sha256sum.txt +26 -0
  266. package/deps/jq/sig/v1.7rc1/jq-1.7rc1.tar.gz.asc +16 -0
  267. package/deps/jq/sig/v1.7rc1/jq-1.7rc1.zip.asc +16 -0
  268. package/deps/jq/sig/v1.7rc1/jq-linux-amd64.asc +16 -0
  269. package/deps/jq/sig/v1.7rc1/jq-linux-arm64.asc +16 -0
  270. package/deps/jq/sig/v1.7rc1/jq-linux-armel.asc +16 -0
  271. package/deps/jq/sig/v1.7rc1/jq-linux-armhf.asc +16 -0
  272. package/deps/jq/sig/v1.7rc1/jq-linux-i386.asc +16 -0
  273. package/deps/jq/sig/v1.7rc1/jq-linux-mips.asc +16 -0
  274. package/deps/jq/sig/v1.7rc1/jq-linux-mips64.asc +16 -0
  275. package/deps/jq/sig/v1.7rc1/jq-linux-mips64el.asc +16 -0
  276. package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6.asc +16 -0
  277. package/deps/jq/sig/v1.7rc1/jq-linux-mips64r6el.asc +16 -0
  278. package/deps/jq/sig/v1.7rc1/jq-linux-mipsel.asc +16 -0
  279. package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6.asc +16 -0
  280. package/deps/jq/sig/v1.7rc1/jq-linux-mipsr6el.asc +16 -0
  281. package/deps/jq/sig/v1.7rc1/jq-linux-powerpc.asc +16 -0
  282. package/deps/jq/sig/v1.7rc1/jq-linux-ppc64el.asc +16 -0
  283. package/deps/jq/sig/v1.7rc1/jq-linux-riscv64.asc +16 -0
  284. package/deps/jq/sig/v1.7rc1/jq-linux-s390x.asc +16 -0
  285. package/deps/jq/sig/v1.7rc1/jq-macos-amd64.asc +16 -0
  286. package/deps/jq/sig/v1.7rc1/jq-macos-arm64.asc +16 -0
  287. package/deps/jq/sig/v1.7rc1/jq-windows-amd64.exe.asc +16 -0
  288. package/deps/jq/sig/v1.7rc1/jq-windows-i386.exe.asc +16 -0
  289. package/deps/jq/sig/v1.7rc1/sha256sum.txt +23 -0
  290. package/deps/jq/sig/v1.7rc2/jq-1.7rc2.tar.gz.asc +16 -0
  291. package/deps/jq/sig/v1.7rc2/jq-1.7rc2.zip.asc +16 -0
  292. package/deps/jq/sig/v1.7rc2/jq-linux-amd64.asc +16 -0
  293. package/deps/jq/sig/v1.7rc2/jq-linux-arm64.asc +16 -0
  294. package/deps/jq/sig/v1.7rc2/jq-linux-armel.asc +16 -0
  295. package/deps/jq/sig/v1.7rc2/jq-linux-armhf.asc +16 -0
  296. package/deps/jq/sig/v1.7rc2/jq-linux-i386.asc +16 -0
  297. package/deps/jq/sig/v1.7rc2/jq-linux-mips.asc +16 -0
  298. package/deps/jq/sig/v1.7rc2/jq-linux-mips64.asc +16 -0
  299. package/deps/jq/sig/v1.7rc2/jq-linux-mips64el.asc +16 -0
  300. package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6.asc +16 -0
  301. package/deps/jq/sig/v1.7rc2/jq-linux-mips64r6el.asc +16 -0
  302. package/deps/jq/sig/v1.7rc2/jq-linux-mipsel.asc +16 -0
  303. package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6.asc +16 -0
  304. package/deps/jq/sig/v1.7rc2/jq-linux-mipsr6el.asc +16 -0
  305. package/deps/jq/sig/v1.7rc2/jq-linux-powerpc.asc +16 -0
  306. package/deps/jq/sig/v1.7rc2/jq-linux-ppc64el.asc +16 -0
  307. package/deps/jq/sig/v1.7rc2/jq-linux-riscv64.asc +16 -0
  308. package/deps/jq/sig/v1.7rc2/jq-linux-s390x.asc +16 -0
  309. package/deps/jq/sig/v1.7rc2/jq-macos-amd64.asc +16 -0
  310. package/deps/jq/sig/v1.7rc2/jq-macos-arm64.asc +16 -0
  311. package/deps/jq/sig/v1.7rc2/jq-windows-amd64.exe.asc +16 -0
  312. package/deps/jq/sig/v1.7rc2/jq-windows-i386.exe.asc +16 -0
  313. package/deps/jq/sig/v1.7rc2/sha256sum.txt +23 -0
  314. package/deps/jq/src/builtin.c +537 -343
  315. package/deps/jq/src/builtin.h +18 -0
  316. package/deps/jq/src/builtin.jq +116 -143
  317. package/deps/jq/src/bytecode.h +8 -4
  318. package/deps/jq/src/compile.c +157 -143
  319. package/deps/jq/src/compile.h +3 -4
  320. package/deps/jq/src/decNumber/ICU-license.html +45 -0
  321. package/deps/jq/src/decNumber/decBasic.c +3908 -0
  322. package/deps/jq/src/decNumber/decCommon.c +1835 -0
  323. package/deps/jq/src/decNumber/decContext.c +437 -0
  324. package/deps/jq/src/decNumber/decContext.h +254 -0
  325. package/deps/jq/src/decNumber/decDPD.h +1185 -0
  326. package/deps/jq/src/decNumber/decDouble.c +140 -0
  327. package/deps/jq/src/decNumber/decDouble.h +155 -0
  328. package/deps/jq/src/decNumber/decNumber.c +8143 -0
  329. package/deps/jq/src/decNumber/decNumber.h +182 -0
  330. package/deps/jq/src/decNumber/decNumberLocal.h +757 -0
  331. package/deps/jq/src/decNumber/decPacked.c +220 -0
  332. package/deps/jq/src/decNumber/decPacked.h +52 -0
  333. package/deps/jq/src/decNumber/decQuad.c +135 -0
  334. package/deps/jq/src/decNumber/decQuad.h +177 -0
  335. package/deps/jq/src/decNumber/decSingle.c +71 -0
  336. package/deps/jq/src/decNumber/decSingle.h +86 -0
  337. package/deps/jq/src/decNumber/decimal128.c +553 -0
  338. package/deps/jq/src/decNumber/decimal128.h +81 -0
  339. package/deps/jq/src/decNumber/decimal32.c +476 -0
  340. package/deps/jq/src/decNumber/decimal32.h +81 -0
  341. package/deps/jq/src/decNumber/decimal64.c +839 -0
  342. package/deps/jq/src/decNumber/decimal64.h +83 -0
  343. package/deps/jq/src/decNumber/decnumber.pdf +0 -0
  344. package/deps/jq/src/decNumber/example1.c +38 -0
  345. package/deps/jq/src/decNumber/example2.c +52 -0
  346. package/deps/jq/src/decNumber/example3.c +64 -0
  347. package/deps/jq/src/decNumber/example4.c +61 -0
  348. package/deps/jq/src/decNumber/example5.c +36 -0
  349. package/deps/jq/src/decNumber/example6.c +61 -0
  350. package/deps/jq/src/decNumber/example7.c +35 -0
  351. package/deps/jq/src/decNumber/example8.c +39 -0
  352. package/deps/jq/src/decNumber/readme.txt +81 -0
  353. package/deps/jq/src/exec_stack.h +5 -3
  354. package/deps/jq/src/execute.c +126 -44
  355. package/deps/jq/src/inject_errors.c +0 -2
  356. package/deps/jq/src/jq.h +10 -1
  357. package/deps/jq/src/jq_test.c +222 -11
  358. package/deps/jq/src/jv.c +807 -176
  359. package/deps/jq/src/jv.h +22 -1
  360. package/deps/jq/src/jv_alloc.c +33 -26
  361. package/deps/jq/src/jv_alloc.h +0 -11
  362. package/deps/jq/src/jv_aux.c +153 -67
  363. package/deps/jq/src/jv_dtoa.c +12 -2
  364. package/deps/jq/src/jv_dtoa_tsd.c +51 -0
  365. package/deps/jq/src/jv_dtoa_tsd.h +4 -0
  366. package/deps/jq/src/jv_parse.c +70 -15
  367. package/deps/jq/src/jv_print.c +56 -60
  368. package/deps/jq/src/jv_private.h +7 -0
  369. package/deps/jq/src/jv_thread.h +76 -0
  370. package/deps/jq/src/jv_unicode.c +18 -0
  371. package/deps/jq/src/jv_unicode.h +2 -0
  372. package/deps/jq/src/lexer.c +782 -543
  373. package/deps/jq/src/lexer.h +438 -64
  374. package/deps/jq/src/lexer.l +10 -3
  375. package/deps/jq/src/libm.h +16 -6
  376. package/deps/jq/src/linker.c +97 -40
  377. package/deps/jq/src/locfile.c +2 -1
  378. package/deps/jq/src/main.c +384 -336
  379. package/deps/jq/src/opcode_list.h +5 -2
  380. package/deps/jq/src/parser.c +2260 -1898
  381. package/deps/jq/src/parser.h +115 -98
  382. package/deps/jq/src/parser.y +124 -89
  383. package/deps/jq/src/util.c +854 -55
  384. package/deps/jq/src/util.h +6 -4
  385. package/deps/jq/tests/jq.test +762 -26
  386. package/deps/jq/tests/jq_fuzz_compile.c +27 -0
  387. package/deps/jq/tests/jq_fuzz_execute.cpp +42 -0
  388. package/deps/jq/tests/jq_fuzz_fixed.cpp +297 -0
  389. package/deps/jq/tests/jq_fuzz_load_file.c +28 -0
  390. package/deps/jq/tests/jq_fuzz_parse.c +21 -0
  391. package/deps/jq/tests/jq_fuzz_parse_extended.c +36 -0
  392. package/deps/jq/tests/jq_fuzz_parse_stream.c +21 -0
  393. package/deps/jq/tests/local.supp +14 -0
  394. package/deps/jq/tests/man.test +979 -0
  395. package/deps/jq/tests/manonig.test +76 -0
  396. package/deps/jq/tests/manonigtest +5 -0
  397. package/deps/jq/tests/mantest +1 -2
  398. package/deps/jq/tests/modules/home2/.jq/g.jq +1 -0
  399. package/deps/jq/tests/modules/shadow1.jq +2 -0
  400. package/deps/jq/tests/modules/shadow2.jq +1 -0
  401. package/deps/jq/tests/modules/test_bind_order0.jq +1 -0
  402. package/deps/jq/tests/modules/test_bind_order1.jq +1 -1
  403. package/deps/jq/tests/modules/test_bind_order2.jq +0 -1
  404. package/deps/jq/tests/no-main-program.jq +1 -0
  405. package/deps/jq/tests/onig.test +77 -2
  406. package/deps/jq/tests/setup +7 -2
  407. package/deps/jq/tests/shtest +478 -59
  408. package/deps/jq/tests/uri.test +38 -0
  409. package/deps/jq/tests/uritest +5 -0
  410. package/deps/jq/tests/yes-main-program.jq +2 -0
  411. package/lib/index.js +3 -0
  412. package/lib/jq.js +15 -1
  413. package/lib/templateAsync.js +137 -0
  414. package/package.json +7 -7
  415. package/src/binding.cc +623 -146
  416. package/src/binding.h +3 -4
  417. package/test/santiy-async.test.js +171 -0
  418. package/test/santiy.test.js +2 -2
  419. package/test/template-async.test.js +182 -0
  420. package/test/template.test.js +3 -3
  421. package/deps/jq/.travis.yml +0 -202
  422. package/deps/jq/NEWS +0 -89
  423. package/deps/jq/appveyor.yml +0 -53
  424. package/deps/jq/docs/Gemfile +0 -7
  425. package/deps/jq/docs/Gemfile.lock +0 -63
  426. package/deps/jq/docs/Rakefile +0 -24
  427. package/deps/jq/docs/Rakefile.manual +0 -49
  428. package/deps/jq/docs/Rakefile.website +0 -76
  429. package/deps/jq/docs/content/1.tutorial/default.yml +0 -327
  430. package/deps/jq/docs/content/2.download/default.yml +0 -193
  431. package/deps/jq/docs/content/index/index.yml +0 -73
  432. package/deps/jq/docs/public/css/base.scss +0 -181
  433. package/deps/jq/docs/public/jq.png +0 -0
  434. package/deps/jq/docs/site.yml +0 -9
  435. package/deps/jq/docs/templates/default.liquid +0 -34
  436. package/deps/jq/docs/templates/index.liquid +0 -73
  437. package/deps/jq/docs/templates/manual.liquid +0 -99
  438. package/deps/jq/docs/templates/shared/_footer.liquid +0 -10
  439. package/deps/jq/docs/templates/shared/_head.liquid +0 -17
  440. package/deps/jq/docs/templates/shared/_navbar.liquid +0 -27
  441. package/deps/jq/modules/oniguruma/README.ja +0 -195
  442. package/deps/jq/modules/oniguruma/cmake/dist.cmake +0 -321
  443. package/deps/jq/modules/oniguruma/contributed/libfuzzer-onig.cpp +0 -31
  444. package/deps/jq/modules/oniguruma/dist.info +0 -10
  445. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold1_key.c +0 -2250
  446. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold2_key.c +0 -203
  447. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold3_key.c +0 -113
  448. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_fold_data.c +0 -1225
  449. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data.c +0 -24742
  450. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_property_data_posix.c +0 -4846
  451. package/deps/jq/modules/oniguruma/src/unicode-7.0/unicode_unfold_key.c +0 -2571
  452. /package/deps/jq/sig/{jq-release.key → jq-release-old.key} +0 -0
  453. /package/deps/jq/tests/modules/{.jq → home1/.jq} +0 -0
@@ -1,11 +1,6 @@
1
1
  ---
2
2
  headline: jq 1.4 Manual
3
3
 
4
- history: |
5
-
6
- *The manual for the development version of jq can be found
7
- [here](/jq/manual).*
8
-
9
4
  body: |
10
5
 
11
6
  A jq program is a "filter": it takes an input, and produces an
@@ -63,7 +58,7 @@ manpage_epilogue: |
63
58
 
64
59
  Presumably. Report them or discuss them at:
65
60
 
66
- https://github.com/stedolan/jq/issues
61
+ https://github.com/jqlang/jq/issues
67
62
 
68
63
  ## AUTHOR
69
64
 
@@ -76,8 +71,8 @@ sections:
76
71
  jq filters run on a stream of JSON data. The input to jq is
77
72
  parsed as a sequence of whitespace-separated JSON values which
78
73
  are passed through the provided filter one at a time. The
79
- output(s) of the filter are written to standard out, again as a
80
- sequence of whitespace-separated JSON data.
74
+ output(s) of the filter are written to standard output, as a
75
+ sequence of newline-separated JSON data.
81
76
 
82
77
  Note: it is important to mind the shell's quoting rules. As a
83
78
  general rule it's best to always quote (with single-quote
@@ -93,46 +88,43 @@ sections:
93
88
  You can affect how jq reads and writes its input and output
94
89
  using some command-line options:
95
90
 
96
- * `--version`:
91
+ * `--null-input` / `-n`:
97
92
 
98
- Output the jq version and exit with zero.
93
+ Don't read any input at all. Instead, the filter is run once
94
+ using `null` as the input. This is useful when using jq as a
95
+ simple calculator or to construct JSON data from scratch.
96
+
97
+ * `--raw-input` / `-R`:
98
+
99
+ Don't parse the input as JSON. Instead, each line of text is
100
+ passed to the filter as a string. If combined with `--slurp`,
101
+ then the entire input is passed to the filter as a single long
102
+ string.
99
103
 
100
- * `--slurp`/`-s`:
104
+ * `--slurp` / `-s`:
101
105
 
102
106
  Instead of running the filter for each JSON object in the
103
107
  input, read the entire input stream into a large array and run
104
108
  the filter just once.
105
109
 
106
- * `--online-input`/`-I`:
110
+ * `--online-input` / `-I`:
107
111
 
108
112
  When the top-level input value is an array produce its elements
109
113
  instead of the array. This allows on-line processing of
110
114
  potentially very large top-level arrays' elements.
111
115
 
112
- * `--raw-input`/`-R`:
113
-
114
- Don't parse the input as JSON. Instead, each line of text is
115
- passed to the filter as a string. If combined with `--slurp`,
116
- then the entire input is passed to the filter as a single long
117
- string.
118
-
119
- * `--null-input`/`-n`:
120
-
121
- Don't read any input at all! Instead, the filter is run once
122
- using `null` as the input. This is useful when using jq as a
123
- simple calculator or to construct JSON data from scratch.
124
-
125
116
  * `--compact-output` / `-c`:
126
117
 
127
118
  By default, jq pretty-prints JSON output. Using this option
128
119
  will result in more compact output by instead putting each
129
120
  JSON object on a single line.
130
121
 
131
- * `--color-output` / `-C` and `--monochrome-output` / `-M`:
122
+ * `--raw-output` / `-r`:
132
123
 
133
- By default, jq outputs colored JSON if writing to a
134
- terminal. You can force it to produce color even if writing to
135
- a pipe or a file using `-C`, and disable color with `-M`.
124
+ With this option, if the filter's result is a string then it
125
+ will be written directly to standard output rather than being
126
+ formatted as a JSON string with quotes. This can be useful for
127
+ making jq filters talk to non-JSON-based systems.
136
128
 
137
129
  * `--ascii-output` / `-a`:
138
130
 
@@ -142,37 +134,27 @@ sections:
142
134
  ASCII output with every non-ASCII character replaced with the
143
135
  equivalent escape sequence.
144
136
 
145
- * `--unbuffered`
146
-
147
- Flush the output after each JSON object is printed (useful if
148
- you're piping a slow data source into jq and piping jq's
149
- output elsewhere).
150
-
151
137
  * `--sort-keys` / `-S`:
152
138
 
153
139
  Output the fields of each object with the keys in sorted order.
154
140
 
155
- * `--raw-output` / `-r`:
141
+ * `--color-output` / `-C` and `--monochrome-output` / `-M`:
156
142
 
157
- With this option, if the filter's result is a string then it
158
- will be written directly to standard output rather than being
159
- formatted as a JSON string with quotes. This can be useful for
160
- making jq filters talk to non-JSON-based systems.
143
+ By default, jq outputs colored JSON if writing to a
144
+ terminal. You can force it to produce color even if writing to
145
+ a pipe or a file using `-C`, and disable color with `-M`.
146
+
147
+ * `--unbuffered`:
148
+
149
+ Flush the output after each JSON object is printed (useful if
150
+ you're piping a slow data source into jq and piping jq's
151
+ output elsewhere).
161
152
 
162
153
  * `-f filename` / `--from-file filename`:
163
154
 
164
155
  Read filter from the file rather than from a command line, like
165
156
  awk's -f option. You can also use '#' to make comments.
166
157
 
167
- * `-e` / `--exit-status`:
168
-
169
- Sets the exit status of jq to 0 if the last output values was
170
- neither `false` nor `null`, 1 if the last output value was
171
- either `false` or `null`, or 4 if no valid result was ever
172
- produced. Normally jq exits with 2 if there was any usage
173
- problem or system error, 3 if there was a jq program compile
174
- error, or 0 if the jq program ran.
175
-
176
158
  * `--arg name value`:
177
159
 
178
160
  This option passes a value to the jq program as a predefined
@@ -187,6 +169,23 @@ sections:
187
169
  program and has the value resulting from parsing the content of
188
170
  the file named `bar`.
189
171
 
172
+ * `--exit-status` / `-e`:
173
+
174
+ Sets the exit status of jq to 0 if the last output value was
175
+ neither `false` nor `null`, 1 if the last output value was
176
+ either `false` or `null`, or 4 if no valid result was ever
177
+ produced. Normally jq exits with 2 if there was any usage
178
+ problem or system error, 3 if there was a jq program compile
179
+ error, or 0 if the jq program ran.
180
+
181
+ * `--version` / `-V`:
182
+
183
+ Output the jq version and exit with zero.
184
+
185
+ * `--help` / `-h`:
186
+
187
+ Output the jq help and exit with zero.
188
+
190
189
  - title: Basic filters
191
190
  entries:
192
191
  - title: "`.`"
@@ -212,50 +211,49 @@ sections:
212
211
  JSON object (aka dictionary or hash) as input, it produces
213
212
  the value at the key "foo", or null if there's none present.
214
213
 
215
- If the key contains special characters, you need to surround
216
- it with double quotes like this: `."foo$"`.
214
+ If the key contains special characters or starts with a digit,
215
+ you need to surround it with double quotes like this: `."foo$"`.
217
216
 
218
217
  A filter of the form `.foo.bar` is equivalent to `.foo|.bar`.
219
218
 
220
219
  examples:
221
220
  - program: '.foo'
222
221
  input: '{"foo": 42, "bar": "less interesting data"}'
223
- output: [42]
222
+ output: ['42']
224
223
  - program: '.foo'
225
224
  input: '{"notfoo": true, "alsonotfoo": false}'
226
225
  output: ['null']
227
226
  - program: '.["foo"]'
228
227
  input: '{"foo": 42}'
229
- output: [42]
228
+ output: ['42']
230
229
 
231
230
  - title: "`.foo?`"
232
231
  body: |
233
232
 
234
- Just like `.foo`, but does not output even an error when `.`
235
- is not an array or an object.
233
+ Just like `.foo`, but does not output an error when `.` is not an
234
+ object.
236
235
 
237
236
  examples:
238
237
  - program: '.foo?'
239
238
  input: '{"foo": 42, "bar": "less interesting data"}'
240
- output: [42]
239
+ output: ['42']
241
240
  - program: '.foo?'
242
241
  input: '{"notfoo": true, "alsonotfoo": false}'
243
242
  output: ['null']
244
243
  - program: '.["foo"]?'
245
244
  input: '{"foo": 42}'
246
- output: [42]
245
+ output: ['42']
247
246
  - program: '[.foo?]'
248
247
  input: '[1,2]'
249
248
  output: ['[]']
250
249
 
251
- - title: "`.[<string>]`, `.[2]`, `.[10:15]`"
250
+ - title: "`.[<string>]`, `.[<number>]`, `.[<number>:<number>]`"
252
251
  body: |
253
252
 
254
253
  You can also look up fields of an object using syntax like
255
- `.["foo"]` (.foo above is a shorthand version of this). This
256
- one works for arrays as well, if the key is an
257
- integer. Arrays are zero-based (like javascript), so `.[2]`
258
- returns the third element of the array.
254
+ `.["foo"]` (`.foo` above is a shorthand version of this). This
255
+ one works for arrays as well, if the key is an integer. Arrays
256
+ are zero-based, so `.[2]` returns the third element of the array.
259
257
 
260
258
  The `.[10:15]` syntax can be used to return a subarray of an
261
259
  array or substring of a string. The array returned by
@@ -263,7 +261,7 @@ sections:
263
261
  index 10 (inclusive) to index 15 (exclusive). Either index may
264
262
  be negative (in which case it counts backwards from the end of
265
263
  the array), or omitted (in which case it refers to the start
266
- or end of the array).
264
+ or end of the array). Indices are zero-based.
267
265
 
268
266
  The `?` "operator" can also be used with the slice operator,
269
267
  as in `.[10:15]?`, which outputs values where the inputs are
@@ -375,13 +373,13 @@ sections:
375
373
  hashes with only string keys), and "null".
376
374
 
377
375
  Booleans, null, strings and numbers are written the same way as
378
- in javascript. Just like everything else in jq, these simple
376
+ in JSON. Just like everything else in jq, these simple
379
377
  values take an input and produce an output - `42` is a valid jq
380
378
  expression that takes an input, ignores it, and returns 42
381
379
  instead.
382
380
 
383
381
  entries:
384
- - title: Array construction - `[]`
382
+ - title: "Array construction: `[]`"
385
383
  body: |
386
384
 
387
385
  As in JSON, `[]` is used to construct arrays, as in
@@ -406,7 +404,7 @@ sections:
406
404
  - program: "[.user, .projects[]]"
407
405
  input: '{"user":"stedolan", "projects": ["jq", "wikiflow"]}'
408
406
  output: ['["stedolan", "jq", "wikiflow"]']
409
- - title: Objects - `{}`
407
+ - title: "Objects: `{}`"
410
408
  body: |
411
409
 
412
410
  Like JSON, `{}` is for constructing objects (aka
@@ -467,14 +465,14 @@ sections:
467
465
  - title: Builtin operators and functions
468
466
  body: |
469
467
 
470
- Some jq operator (for instance, `+`) do different things
468
+ Some jq operators (for instance, `+`) do different things
471
469
  depending on the type of their arguments (arrays, numbers,
472
470
  etc.). However, jq never does implicit type conversions. If you
473
471
  try to add a string to an object you'll get an error message and
474
472
  no result.
475
473
 
476
474
  entries:
477
- - title: Addition - `+`
475
+ - title: "Addition: `+`"
478
476
  body: |
479
477
 
480
478
  The operator `+` takes two filters, applies them both
@@ -513,11 +511,11 @@ sections:
513
511
  input: 'null'
514
512
  output: ['{"a": 42, "b": 2, "c": 3}']
515
513
 
516
- - title: Subtraction - `-`
514
+ - title: "Subtraction: `-`"
517
515
  body: |
518
516
 
519
517
  As well as normal arithmetic subtraction on numbers, the `-`
520
- operator can be used on arrays to remove all occurences of
518
+ operator can be used on arrays to remove all occurrences of
521
519
  the second array's elements from the first array.
522
520
 
523
521
  examples:
@@ -528,7 +526,7 @@ sections:
528
526
  input: '["xml", "yaml", "json"]'
529
527
  output: ['["json"]']
530
528
 
531
- - title: Multiplication, division, modulo - `*`, `/`, and `%`
529
+ - title: "Multiplication, division, modulo: `*`, `/`, `%`"
532
530
  body: |
533
531
 
534
532
  These operators only work on numbers, and do the expected.
@@ -546,8 +544,8 @@ sections:
546
544
 
547
545
  examples:
548
546
  - program: '10 / . * 3'
549
- input: 5
550
- output: [6]
547
+ input: '5'
548
+ output: ['6']
551
549
  - program: '. / ", "'
552
550
  input: '"a, b,c,d, e"'
553
551
  output: ['["a","b,c,d","e"]']
@@ -574,7 +572,7 @@ sections:
574
572
  examples:
575
573
  - program: '.[] | length'
576
574
  input: '[[1,2], "string", {"a":2}, null]'
577
- output: [2, 6, 1, 0]
575
+ output: ['2', '6', '1', '0']
578
576
 
579
577
  - title: "`keys`"
580
578
  body: |
@@ -632,7 +630,7 @@ sections:
632
630
  input: '["foo", "bar", "baz"]'
633
631
  output: ['["foo"]']
634
632
 
635
- - title: "`to_entries`, `from_entries`, `with_entries`"
633
+ - title: "`to_entries`, `from_entries`, `with_entries(f)`"
636
634
  body: |
637
635
 
638
636
  These functions convert between an object and an array of
@@ -641,9 +639,9 @@ sections:
641
639
  includes `{"key": k, "value": v}`.
642
640
 
643
641
  `from_entries` does the opposite conversion, and
644
- `with_entries(foo)` is a shorthand for `to_entries |
645
- map(foo) | from_entries`, useful for doing some operation to
646
- all keys and values of an object.
642
+ `with_entries(f)` is a shorthand for `to_entries | map(f) |
643
+ from_entries`, useful for doing some operation to all keys
644
+ and values of an object.
647
645
 
648
646
  examples:
649
647
  - program: 'to_entries'
@@ -695,19 +693,19 @@ sections:
695
693
  examples:
696
694
  - program: '1, empty, 2'
697
695
  input: 'null'
698
- output: [1, 2]
696
+ output: ['1', '2']
699
697
  - program: '[1,2,empty,3]'
700
698
  input: 'null'
701
699
  output: ['[1,2,3]']
702
700
 
703
- - title: "`map(x)`"
701
+ - title: "`map(f)`"
704
702
  body: |
705
703
 
706
- For any filter `x`, `map(x)` will run that filter for each
704
+ For any filter `f`, `map(f)` will run that filter for each
707
705
  element of the input array, and produce the outputs a new
708
706
  array. `map(.+1)` will increment each element of an array of numbers.
709
707
 
710
- `map(x)` is equivalent to `[.[] | x]`. In fact, this is how
708
+ `map(f)` is equivalent to `[.[] | f]`. In fact, this is how
711
709
  it's defined.
712
710
 
713
711
  examples:
@@ -758,7 +756,7 @@ sections:
758
756
  output: ['"abc"']
759
757
  - program: add
760
758
  input: '[1, 2, 3]'
761
- output: [6]
759
+ output: ['6']
762
760
  - program: add
763
761
  input: '[]'
764
762
  output: ["null"]
@@ -849,7 +847,7 @@ sections:
849
847
  examples:
850
848
  - program: '.[] | tonumber'
851
849
  input: '[1, "1"]'
852
- output: [1, 1]
850
+ output: ['1', '1']
853
851
 
854
852
  - title: "`tostring`"
855
853
  body: |
@@ -875,7 +873,7 @@ sections:
875
873
  input: '[0, false, [], {}, null, "hello"]'
876
874
  output: ['["number", "boolean", "array", "object", "null", "string"]']
877
875
 
878
- - title: "`sort, sort_by`"
876
+ - title: "`sort`, `sort_by`"
879
877
  body: |
880
878
 
881
879
  The `sort` functions sorts its input, which must be an
@@ -957,7 +955,7 @@ sections:
957
955
 
958
956
  The `unique_by(.foo)` function takes as input an array and produces
959
957
  an array of the same elements, in sorted order, with
960
- elqements with a duplicate `.foo` field removed. Think of it as making
958
+ elements with a duplicate `.foo` field removed. Think of it as making
961
959
  an array by taking one element out of every group produced by
962
960
  `group_by`.
963
961
 
@@ -1179,7 +1177,7 @@ sections:
1179
1177
  input: '[[{"a":1}]]'
1180
1178
  output: ['1']
1181
1179
 
1182
- - title: "String interpolation - `\\(foo)`"
1180
+ - title: "String interpolation: `\\(exp)`"
1183
1181
  body: |
1184
1182
 
1185
1183
  Inside a string, you can put an expression inside parens
@@ -1274,10 +1272,6 @@ sections:
1274
1272
  input: '"This works if x < y"'
1275
1273
  output: ['"This works if x &lt; y"']
1276
1274
 
1277
- # - program: '@html "<span>Anonymous said: \(.)</span>"'
1278
- # input: '"<script>alert(\"lol hax\");</script>"'
1279
- # output: ["<span>Anonymous said: &lt;script&gt;alert(&quot;lol hax&quot;);&lt;/script&gt;</span>"]
1280
-
1281
1275
  - program: '@sh "echo \(.)"'
1282
1276
  input: "\"O'Hara's Ale\""
1283
1277
  output: ["\"echo 'O'\\\\''Hara'\\\\''s Ale'\""]
@@ -1290,8 +1284,8 @@ sections:
1290
1284
  The expression 'a == b' will produce 'true' if the result of a and b
1291
1285
  are equal (that is, if they represent equivalent JSON documents) and
1292
1286
  'false' otherwise. In particular, strings are never considered equal
1293
- to numbers. If you're coming from Javascript, jq's == is like
1294
- Javascript's === - considering values equal only when they have the
1287
+ to numbers. If you're coming from JavaScript, jq's == is like
1288
+ JavaScript's === - considering values equal only when they have the
1295
1289
  same type as well as the same value.
1296
1290
 
1297
1291
  != is "not equal", and 'a != b' returns the opposite value of 'a == b'
@@ -1300,7 +1294,8 @@ sections:
1300
1294
  - program: '.[] == 1'
1301
1295
  input: '[1, 1.0, "1", "banana"]'
1302
1296
  output: ['true', 'true', 'false', 'false']
1303
- - title: if-then-else
1297
+
1298
+ - title: if-then-else-end
1304
1299
  body: |
1305
1300
 
1306
1301
  `if A then B else C end` will act the same as `B` if `A`
@@ -1308,7 +1303,7 @@ sections:
1308
1303
  as `C` otherwise.
1309
1304
 
1310
1305
  Checking for false or null is a simpler notion of
1311
- "truthiness" than is found in Javascript or Python, but it
1306
+ "truthiness" than is found in JavaScript or Python, but it
1312
1307
  means that you'll sometimes have to be more explicit about
1313
1308
  the condition you want: you can't test whether, e.g. a
1314
1309
  string is empty using `if .name then A else B end`, you'll
@@ -1330,10 +1325,10 @@ sections:
1330
1325
  else
1331
1326
  "many"
1332
1327
  end
1333
- input: 2
1328
+ input: '2'
1334
1329
  output: ['"many"']
1335
1330
 
1336
- - title: "`>, >=, <=, <`"
1331
+ - title: "`>`, `>=`, `<=`, `<`"
1337
1332
  body: |
1338
1333
 
1339
1334
  The comparison operators `>`, `>=`, `<=`, `<` return whether
@@ -1345,15 +1340,16 @@ sections:
1345
1340
 
1346
1341
  examples:
1347
1342
  - program: '. < 5'
1348
- input: 2
1343
+ input: '2'
1349
1344
  output: ['true']
1350
1345
 
1351
- - title: and/or/not
1346
+ - title: "`and`, `or`, `not`"
1352
1347
  body: |
1353
1348
 
1354
- jq supports the normal Boolean operators and/or/not. They have the
1355
- same standard of truth as if expressions - false and null are
1356
- considered "false values", and anything else is a "true value".
1349
+ jq supports the normal Boolean operators `and`, `or`, `not`.
1350
+ They have the same standard of truth as if expressions -
1351
+ `false` and `null` are considered "false values", and
1352
+ anything else is a "true value".
1357
1353
 
1358
1354
  If an operand of one of these operators produces multiple
1359
1355
  results, the operator itself will produce a result for each input.
@@ -1363,12 +1359,12 @@ sections:
1363
1359
  rather than with special syntax, as in `.foo and .bar |
1364
1360
  not`.
1365
1361
 
1366
- These three only produce the values "true" and "false", and
1362
+ These three only produce the values `true` and `false`, and
1367
1363
  so are only useful for genuine Boolean operations, rather
1368
1364
  than the common Perl/Python/Ruby idiom of
1369
1365
  "value_that_may_be_null or default". If you want to use this
1370
1366
  form of "or", picking between two values rather than
1371
- evaluating a condition, see the "//" operator below.
1367
+ evaluating a condition, see the `//` operator below.
1372
1368
 
1373
1369
  examples:
1374
1370
  - program: '42 and "a string"'
@@ -1377,9 +1373,6 @@ sections:
1377
1373
  - program: '(true, false) or false'
1378
1374
  input: 'null'
1379
1375
  output: ['true', 'false']
1380
- # - program: '(true, false) and (true, false)'
1381
- # input: 'null'
1382
- # output: ['true', 'false', 'false', 'false']
1383
1376
  - program: '(true, true) and (true, false)'
1384
1377
  input: 'null'
1385
1378
  output: ['true', 'false', 'true', 'false']
@@ -1387,7 +1380,7 @@ sections:
1387
1380
  input: 'null'
1388
1381
  output: ['[false, true]']
1389
1382
 
1390
- - title: Alternative operator - `//`
1383
+ - title: "Alternative operator: `//`"
1391
1384
  body: |
1392
1385
 
1393
1386
  A filter of the form `a // b` produces the same
@@ -1403,10 +1396,10 @@ sections:
1403
1396
  examples:
1404
1397
  - program: '.foo // 42'
1405
1398
  input: '{"foo": 19}'
1406
- output: [19]
1399
+ output: ['19']
1407
1400
  - program: '.foo // 42'
1408
1401
  input: '{}'
1409
- output: [42]
1402
+ output: ['42']
1410
1403
 
1411
1404
  - title: Advanced features
1412
1405
  body: |
@@ -1422,7 +1415,7 @@ sections:
1422
1415
 
1423
1416
  It is also possible to define functions in jq, although this is
1424
1417
  is a feature whose biggest use is defining jq's standard library
1425
- (many jq functions such as `map` and `find` are in fact written
1418
+ (many jq functions such as `map` and `select` are in fact written
1426
1419
  in jq).
1427
1420
 
1428
1421
  Finally, jq has a `reduce` operation, which is very powerful but a
@@ -1463,7 +1456,7 @@ sections:
1463
1456
  fields, and another object which is used to map author usernames to
1464
1457
  real names. Our input looks like:
1465
1458
 
1466
- {"posts": [{"title": "Frist psot", "author": "anon"},
1459
+ {"posts": [{"title": "First post", "author": "anon"},
1467
1460
  {"title": "A well-written article", "author": "person1"}],
1468
1461
  "realnames": {"anon": "Anonymous Coward",
1469
1462
  "person1": "Person McPherson"}}
@@ -1471,7 +1464,7 @@ sections:
1471
1464
  We want to produce the posts with the author field containing a real
1472
1465
  name, as in:
1473
1466
 
1474
- {"title": "Frist psot", "author": "Anonymous Coward"}
1467
+ {"title": "First post", "author": "Anonymous Coward"}
1475
1468
  {"title": "A well-written article", "author": "Person McPherson"}
1476
1469
 
1477
1470
  We use a variable, $names, to store the realnames object, so that we
@@ -1535,29 +1528,29 @@ sections:
1535
1528
  input: '[[1,2],[10,20]]'
1536
1529
  output: ['[[1,2,1,2], [10,20,1,2]]']
1537
1530
 
1538
- - title: Reduce
1531
+ - title: "`reduce`"
1539
1532
  body: |
1540
1533
 
1541
- The `reduce` syntax in jq allows you to combine all of the
1542
- results of an expression by accumulating them into a single
1543
- answer. As an example, we'll pass `[3,2,1]` to this expression:
1534
+ The `reduce` syntax allows you to combine all of the results of
1535
+ an expression by accumulating them into a single answer.
1536
+ The form is `reduce EXP as $var (INIT; UPDATE)`.
1537
+ As an example, we'll pass `[1,2,3]` to this expression:
1544
1538
 
1545
1539
  reduce .[] as $item (0; . + $item)
1546
1540
 
1547
1541
  For each result that `.[]` produces, `. + $item` is run to
1548
- accumulate a running total, starting from 0. In this
1549
- example, `.[]` produces the results 3, 2, and 1, so the
1550
- effect is similar to running something like this:
1542
+ accumulate a running total, starting from 0 as the input value.
1543
+ In this example, `.[]` produces the results `1`, `2`, and `3`,
1544
+ so the effect is similar to running something like this:
1551
1545
 
1552
- 0 | (3 as $item | . + $item) |
1553
- (2 as $item | . + $item) |
1554
- (1 as $item | . + $item)
1546
+ 0 | 1 as $item | . + $item |
1547
+ 2 as $item | . + $item |
1548
+ 3 as $item | . + $item
1555
1549
 
1556
1550
  examples:
1557
1551
  - program: 'reduce .[] as $item (0; . + $item)'
1558
- input: '[10,2,5,3]'
1559
- output: ['20']
1560
-
1552
+ input: '[1,2,3,4,5]'
1553
+ output: ['15']
1561
1554
 
1562
1555
  - title: Assignment
1563
1556
  body: |
@@ -1571,7 +1564,7 @@ sections:
1571
1564
  If an object has two fields which are arrays, `.foo` and `.bar`,
1572
1565
  and you append something to `.foo`, then `.bar` will not get
1573
1566
  bigger. Even if you've just set `.bar = .foo`. If you're used to
1574
- programming in languages like Python, Java, Ruby, Javascript,
1567
+ programming in languages like Python, Java, Ruby, JavaScript,
1575
1568
  etc. then you can think of it as though jq does a full deep copy
1576
1569
  of every object before it does the assignment (for performance,
1577
1570
  it doesn't actually do that, but that's the general idea).
@@ -1588,7 +1581,7 @@ sections:
1588
1581
  .foo = .bar | .foo.baz = 1
1589
1582
 
1590
1583
  will not have the side-effect of setting .bar.baz to be set
1591
- to 1, as the similar-looking program in Javascript, Python,
1584
+ to 1, as the similar-looking program in JavaScript, Python,
1592
1585
  Ruby or other languages would. Unlike these languages (but
1593
1586
  like Haskell and some other functional languages), there is
1594
1587
  no notion of two arrays or objects being "the same array" or
@@ -1634,7 +1627,7 @@ sections:
1634
1627
  - title: Complex assignments
1635
1628
  body: |
1636
1629
  Lots more things are allowed on the left-hand side of a jq assignment
1637
- than in most langauges. We've already seen simple field accesses on
1630
+ than in most languages. We've already seen simple field accesses on
1638
1631
  the left hand side, and it's no surprise that array accesses work just
1639
1632
  as well:
1640
1633