@tellahq/rescript 10.1.0-alpha.1

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 (997) hide show
  1. package/CHANGELOG.md +1717 -0
  2. package/COPYING +674 -0
  3. package/COPYING.LESSER +165 -0
  4. package/CREDITS.md +59 -0
  5. package/LICENSE +24 -0
  6. package/README.md +114 -0
  7. package/bsc +22 -0
  8. package/bsrefmt +16 -0
  9. package/darwin/bsb_helper.exe +0 -0
  10. package/darwin/bsc.exe +0 -0
  11. package/darwin/ninja.COPYING +202 -0
  12. package/darwin/ninja.exe +0 -0
  13. package/darwin/refmt.exe +0 -0
  14. package/darwin/rescript.exe +0 -0
  15. package/darwinarm64/bsb_helper.exe +0 -0
  16. package/darwinarm64/bsc.exe +0 -0
  17. package/darwinarm64/ninja.COPYING +202 -0
  18. package/darwinarm64/ninja.exe +0 -0
  19. package/darwinarm64/refmt.exe +0 -0
  20. package/darwinarm64/rescript.exe +0 -0
  21. package/docs/docson/build-schema.json +557 -0
  22. package/freebsd/ninja.COPYING +202 -0
  23. package/jscomp/stubs/ext_basic_hash_stubs.c +216 -0
  24. package/lib/4.06.1/bsb_helper.ml +2436 -0
  25. package/lib/4.06.1/bsb_helper.mli +0 -0
  26. package/lib/4.06.1/refmt_main3.ml +115517 -0
  27. package/lib/4.06.1/refmt_main3.mli +1 -0
  28. package/lib/4.06.1/rescript.ml +15500 -0
  29. package/lib/4.06.1/rescript.mli +0 -0
  30. package/lib/4.06.1/whole_compiler.ml +306395 -0
  31. package/lib/4.06.1/whole_compiler.mli +0 -0
  32. package/lib/bstracing +270 -0
  33. package/lib/es6/arg.js +717 -0
  34. package/lib/es6/array.js +511 -0
  35. package/lib/es6/arrayLabels.js +511 -0
  36. package/lib/es6/belt.js +57 -0
  37. package/lib/es6/belt_Array.js +764 -0
  38. package/lib/es6/belt_Float.js +16 -0
  39. package/lib/es6/belt_HashMap.js +280 -0
  40. package/lib/es6/belt_HashMapInt.js +264 -0
  41. package/lib/es6/belt_HashMapString.js +264 -0
  42. package/lib/es6/belt_HashSet.js +222 -0
  43. package/lib/es6/belt_HashSetInt.js +207 -0
  44. package/lib/es6/belt_HashSetString.js +207 -0
  45. package/lib/es6/belt_Id.js +71 -0
  46. package/lib/es6/belt_Int.js +16 -0
  47. package/lib/es6/belt_List.js +1512 -0
  48. package/lib/es6/belt_Map.js +376 -0
  49. package/lib/es6/belt_MapDict.js +417 -0
  50. package/lib/es6/belt_MapInt.js +307 -0
  51. package/lib/es6/belt_MapString.js +307 -0
  52. package/lib/es6/belt_MutableMap.js +395 -0
  53. package/lib/es6/belt_MutableMapInt.js +362 -0
  54. package/lib/es6/belt_MutableMapString.js +362 -0
  55. package/lib/es6/belt_MutableQueue.js +299 -0
  56. package/lib/es6/belt_MutableSet.js +538 -0
  57. package/lib/es6/belt_MutableSetInt.js +501 -0
  58. package/lib/es6/belt_MutableSetString.js +501 -0
  59. package/lib/es6/belt_MutableStack.js +137 -0
  60. package/lib/es6/belt_Option.js +151 -0
  61. package/lib/es6/belt_Range.js +109 -0
  62. package/lib/es6/belt_Result.js +136 -0
  63. package/lib/es6/belt_Set.js +314 -0
  64. package/lib/es6/belt_SetDict.js +362 -0
  65. package/lib/es6/belt_SetInt.js +359 -0
  66. package/lib/es6/belt_SetString.js +359 -0
  67. package/lib/es6/belt_SortArray.js +427 -0
  68. package/lib/es6/belt_SortArrayInt.js +374 -0
  69. package/lib/es6/belt_SortArrayString.js +374 -0
  70. package/lib/es6/belt_internalAVLset.js +940 -0
  71. package/lib/es6/belt_internalAVLtree.js +1146 -0
  72. package/lib/es6/belt_internalBuckets.js +287 -0
  73. package/lib/es6/belt_internalBucketsType.js +49 -0
  74. package/lib/es6/belt_internalMapInt.js +365 -0
  75. package/lib/es6/belt_internalMapString.js +365 -0
  76. package/lib/es6/belt_internalSetBuckets.js +191 -0
  77. package/lib/es6/belt_internalSetInt.js +209 -0
  78. package/lib/es6/belt_internalSetString.js +209 -0
  79. package/lib/es6/buffer.js +477 -0
  80. package/lib/es6/bytes.js +704 -0
  81. package/lib/es6/bytesLabels.js +704 -0
  82. package/lib/es6/callback.js +16 -0
  83. package/lib/es6/caml.js +196 -0
  84. package/lib/es6/caml_array.js +122 -0
  85. package/lib/es6/caml_array_extern.js +1 -0
  86. package/lib/es6/caml_bytes.js +122 -0
  87. package/lib/es6/caml_exceptions.js +31 -0
  88. package/lib/es6/caml_external_polyfill.js +32 -0
  89. package/lib/es6/caml_float.js +129 -0
  90. package/lib/es6/caml_float_extern.js +1 -0
  91. package/lib/es6/caml_format.js +818 -0
  92. package/lib/es6/caml_hash.js +101 -0
  93. package/lib/es6/caml_hash_primitive.js +51 -0
  94. package/lib/es6/caml_int32.js +28 -0
  95. package/lib/es6/caml_int64.js +606 -0
  96. package/lib/es6/caml_int64_extern.js +1 -0
  97. package/lib/es6/caml_js_exceptions.js +31 -0
  98. package/lib/es6/caml_lexer.js +258 -0
  99. package/lib/es6/caml_md5.js +168 -0
  100. package/lib/es6/caml_module.js +117 -0
  101. package/lib/es6/caml_nativeint_extern.js +1 -0
  102. package/lib/es6/caml_obj.js +413 -0
  103. package/lib/es6/caml_option.js +86 -0
  104. package/lib/es6/caml_parser.js +303 -0
  105. package/lib/es6/caml_splice_call.js +52 -0
  106. package/lib/es6/caml_string.js +23 -0
  107. package/lib/es6/caml_string_extern.js +1 -0
  108. package/lib/es6/caml_sys.js +99 -0
  109. package/lib/es6/caml_undefined_extern.js +1 -0
  110. package/lib/es6/camlinternalLazy.js +59 -0
  111. package/lib/es6/camlinternalMod.js +1 -0
  112. package/lib/es6/char.js +126 -0
  113. package/lib/es6/complex.js +176 -0
  114. package/lib/es6/curry.js +526 -0
  115. package/lib/es6/digest.js +118 -0
  116. package/lib/es6/dom.js +12 -0
  117. package/lib/es6/dom_storage.js +27 -0
  118. package/lib/es6/dom_storage2.js +1 -0
  119. package/lib/es6/filename.js +496 -0
  120. package/lib/es6/genlex.js +666 -0
  121. package/lib/es6/hashtbl.js +1115 -0
  122. package/lib/es6/hashtblLabels.js +170 -0
  123. package/lib/es6/int32.js +75 -0
  124. package/lib/es6/int64.js +70 -0
  125. package/lib/es6/js.js +111 -0
  126. package/lib/es6/js_OO.js +15 -0
  127. package/lib/es6/js_array.js +223 -0
  128. package/lib/es6/js_array2.js +1 -0
  129. package/lib/es6/js_bigint.js +1 -0
  130. package/lib/es6/js_cast.js +1 -0
  131. package/lib/es6/js_console.js +1 -0
  132. package/lib/es6/js_date.js +1 -0
  133. package/lib/es6/js_dict.js +85 -0
  134. package/lib/es6/js_exn.js +44 -0
  135. package/lib/es6/js_float.js +1 -0
  136. package/lib/es6/js_global.js +1 -0
  137. package/lib/es6/js_int.js +17 -0
  138. package/lib/es6/js_json.js +172 -0
  139. package/lib/es6/js_list.js +333 -0
  140. package/lib/es6/js_map.js +1 -0
  141. package/lib/es6/js_mapperRt.js +54 -0
  142. package/lib/es6/js_math.js +50 -0
  143. package/lib/es6/js_null.js +49 -0
  144. package/lib/es6/js_null_undefined.js +35 -0
  145. package/lib/es6/js_obj.js +1 -0
  146. package/lib/es6/js_option.js +104 -0
  147. package/lib/es6/js_promise.js +17 -0
  148. package/lib/es6/js_re.js +1 -0
  149. package/lib/es6/js_result.js +1 -0
  150. package/lib/es6/js_set.js +1 -0
  151. package/lib/es6/js_string.js +199 -0
  152. package/lib/es6/js_string2.js +1 -0
  153. package/lib/es6/js_typed_array.js +1733 -0
  154. package/lib/es6/js_typed_array2.js +39 -0
  155. package/lib/es6/js_types.js +77 -0
  156. package/lib/es6/js_undefined.js +52 -0
  157. package/lib/es6/js_vector.js +134 -0
  158. package/lib/es6/js_weakmap.js +1 -0
  159. package/lib/es6/js_weakset.js +1 -0
  160. package/lib/es6/jsx.js +1 -0
  161. package/lib/es6/jsxDOM.js +1 -0
  162. package/lib/es6/jsxDOMStyle.js +1 -0
  163. package/lib/es6/jsxEvent.js +59 -0
  164. package/lib/es6/lazy.js +44 -0
  165. package/lib/es6/lexing.js +217 -0
  166. package/lib/es6/list.js +1713 -0
  167. package/lib/es6/listLabels.js +1713 -0
  168. package/lib/es6/map.js +936 -0
  169. package/lib/es6/mapLabels.js +951 -0
  170. package/lib/es6/moreLabels.js +1931 -0
  171. package/lib/es6/node.js +39 -0
  172. package/lib/es6/node_buffer.js +1 -0
  173. package/lib/es6/node_child_process.js +1 -0
  174. package/lib/es6/node_fs.js +9 -0
  175. package/lib/es6/node_module.js +1 -0
  176. package/lib/es6/node_path.js +1 -0
  177. package/lib/es6/node_process.js +18 -0
  178. package/lib/es6/obj.js +11 -0
  179. package/lib/es6/package.json +1 -0
  180. package/lib/es6/parsing.js +237 -0
  181. package/lib/es6/pervasives.js +250 -0
  182. package/lib/es6/printexc.js +102 -0
  183. package/lib/es6/queue.js +181 -0
  184. package/lib/es6/random.js +280 -0
  185. package/lib/es6/set.js +955 -0
  186. package/lib/es6/setLabels.js +988 -0
  187. package/lib/es6/sort.js +168 -0
  188. package/lib/es6/stack.js +88 -0
  189. package/lib/es6/stdLabels.js +18 -0
  190. package/lib/es6/stream.js +496 -0
  191. package/lib/es6/string.js +337 -0
  192. package/lib/es6/stringLabels.js +337 -0
  193. package/lib/es6/sys.js +182 -0
  194. package/lib/es6/uchar.js +133 -0
  195. package/lib/js/arg.js +715 -0
  196. package/lib/js/array.js +509 -0
  197. package/lib/js/arrayLabels.js +509 -0
  198. package/lib/js/belt.js +55 -0
  199. package/lib/js/belt_Array.js +762 -0
  200. package/lib/js/belt_Float.js +14 -0
  201. package/lib/js/belt_HashMap.js +278 -0
  202. package/lib/js/belt_HashMapInt.js +262 -0
  203. package/lib/js/belt_HashMapString.js +262 -0
  204. package/lib/js/belt_HashSet.js +220 -0
  205. package/lib/js/belt_HashSetInt.js +205 -0
  206. package/lib/js/belt_HashSetString.js +205 -0
  207. package/lib/js/belt_Id.js +69 -0
  208. package/lib/js/belt_Int.js +14 -0
  209. package/lib/js/belt_List.js +1510 -0
  210. package/lib/js/belt_Map.js +374 -0
  211. package/lib/js/belt_MapDict.js +415 -0
  212. package/lib/js/belt_MapInt.js +305 -0
  213. package/lib/js/belt_MapString.js +305 -0
  214. package/lib/js/belt_MutableMap.js +393 -0
  215. package/lib/js/belt_MutableMapInt.js +360 -0
  216. package/lib/js/belt_MutableMapString.js +360 -0
  217. package/lib/js/belt_MutableQueue.js +297 -0
  218. package/lib/js/belt_MutableSet.js +536 -0
  219. package/lib/js/belt_MutableSetInt.js +499 -0
  220. package/lib/js/belt_MutableSetString.js +499 -0
  221. package/lib/js/belt_MutableStack.js +135 -0
  222. package/lib/js/belt_Option.js +149 -0
  223. package/lib/js/belt_Range.js +107 -0
  224. package/lib/js/belt_Result.js +134 -0
  225. package/lib/js/belt_Set.js +312 -0
  226. package/lib/js/belt_SetDict.js +360 -0
  227. package/lib/js/belt_SetInt.js +357 -0
  228. package/lib/js/belt_SetString.js +357 -0
  229. package/lib/js/belt_SortArray.js +425 -0
  230. package/lib/js/belt_SortArrayInt.js +372 -0
  231. package/lib/js/belt_SortArrayString.js +372 -0
  232. package/lib/js/belt_internalAVLset.js +938 -0
  233. package/lib/js/belt_internalAVLtree.js +1144 -0
  234. package/lib/js/belt_internalBuckets.js +285 -0
  235. package/lib/js/belt_internalBucketsType.js +47 -0
  236. package/lib/js/belt_internalMapInt.js +363 -0
  237. package/lib/js/belt_internalMapString.js +363 -0
  238. package/lib/js/belt_internalSetBuckets.js +189 -0
  239. package/lib/js/belt_internalSetInt.js +207 -0
  240. package/lib/js/belt_internalSetString.js +207 -0
  241. package/lib/js/buffer.js +475 -0
  242. package/lib/js/bytes.js +702 -0
  243. package/lib/js/bytesLabels.js +702 -0
  244. package/lib/js/callback.js +14 -0
  245. package/lib/js/caml.js +194 -0
  246. package/lib/js/caml_array.js +120 -0
  247. package/lib/js/caml_array_extern.js +1 -0
  248. package/lib/js/caml_bytes.js +120 -0
  249. package/lib/js/caml_exceptions.js +29 -0
  250. package/lib/js/caml_external_polyfill.js +30 -0
  251. package/lib/js/caml_float.js +127 -0
  252. package/lib/js/caml_float_extern.js +1 -0
  253. package/lib/js/caml_format.js +816 -0
  254. package/lib/js/caml_hash.js +99 -0
  255. package/lib/js/caml_hash_primitive.js +49 -0
  256. package/lib/js/caml_int32.js +26 -0
  257. package/lib/js/caml_int64.js +604 -0
  258. package/lib/js/caml_int64_extern.js +1 -0
  259. package/lib/js/caml_js_exceptions.js +29 -0
  260. package/lib/js/caml_lexer.js +256 -0
  261. package/lib/js/caml_md5.js +166 -0
  262. package/lib/js/caml_module.js +115 -0
  263. package/lib/js/caml_nativeint_extern.js +1 -0
  264. package/lib/js/caml_obj.js +411 -0
  265. package/lib/js/caml_option.js +84 -0
  266. package/lib/js/caml_parser.js +301 -0
  267. package/lib/js/caml_splice_call.js +50 -0
  268. package/lib/js/caml_string.js +21 -0
  269. package/lib/js/caml_string_extern.js +1 -0
  270. package/lib/js/caml_sys.js +97 -0
  271. package/lib/js/caml_undefined_extern.js +1 -0
  272. package/lib/js/camlinternalLazy.js +57 -0
  273. package/lib/js/camlinternalMod.js +1 -0
  274. package/lib/js/char.js +124 -0
  275. package/lib/js/complex.js +174 -0
  276. package/lib/js/curry.js +524 -0
  277. package/lib/js/digest.js +116 -0
  278. package/lib/js/dom.js +10 -0
  279. package/lib/js/dom_storage.js +25 -0
  280. package/lib/js/dom_storage2.js +1 -0
  281. package/lib/js/filename.js +494 -0
  282. package/lib/js/genlex.js +664 -0
  283. package/lib/js/hashtbl.js +1113 -0
  284. package/lib/js/hashtblLabels.js +168 -0
  285. package/lib/js/int32.js +73 -0
  286. package/lib/js/int64.js +68 -0
  287. package/lib/js/js.js +109 -0
  288. package/lib/js/js_OO.js +13 -0
  289. package/lib/js/js_array.js +221 -0
  290. package/lib/js/js_array2.js +1 -0
  291. package/lib/js/js_bigint.js +1 -0
  292. package/lib/js/js_cast.js +1 -0
  293. package/lib/js/js_console.js +1 -0
  294. package/lib/js/js_date.js +1 -0
  295. package/lib/js/js_dict.js +83 -0
  296. package/lib/js/js_exn.js +42 -0
  297. package/lib/js/js_float.js +1 -0
  298. package/lib/js/js_global.js +1 -0
  299. package/lib/js/js_int.js +15 -0
  300. package/lib/js/js_json.js +170 -0
  301. package/lib/js/js_list.js +331 -0
  302. package/lib/js/js_map.js +1 -0
  303. package/lib/js/js_mapperRt.js +52 -0
  304. package/lib/js/js_math.js +48 -0
  305. package/lib/js/js_null.js +47 -0
  306. package/lib/js/js_null_undefined.js +33 -0
  307. package/lib/js/js_obj.js +1 -0
  308. package/lib/js/js_option.js +103 -0
  309. package/lib/js/js_promise.js +15 -0
  310. package/lib/js/js_re.js +1 -0
  311. package/lib/js/js_result.js +1 -0
  312. package/lib/js/js_set.js +1 -0
  313. package/lib/js/js_string.js +197 -0
  314. package/lib/js/js_string2.js +1 -0
  315. package/lib/js/js_typed_array.js +1731 -0
  316. package/lib/js/js_typed_array2.js +37 -0
  317. package/lib/js/js_types.js +75 -0
  318. package/lib/js/js_undefined.js +50 -0
  319. package/lib/js/js_vector.js +132 -0
  320. package/lib/js/js_weakmap.js +1 -0
  321. package/lib/js/js_weakset.js +1 -0
  322. package/lib/js/jsx.js +1 -0
  323. package/lib/js/jsxDOM.js +1 -0
  324. package/lib/js/jsxDOMStyle.js +1 -0
  325. package/lib/js/jsxEvent.js +57 -0
  326. package/lib/js/lazy.js +42 -0
  327. package/lib/js/lexing.js +215 -0
  328. package/lib/js/list.js +1711 -0
  329. package/lib/js/listLabels.js +1711 -0
  330. package/lib/js/map.js +934 -0
  331. package/lib/js/mapLabels.js +949 -0
  332. package/lib/js/moreLabels.js +1929 -0
  333. package/lib/js/node.js +37 -0
  334. package/lib/js/node_buffer.js +1 -0
  335. package/lib/js/node_child_process.js +1 -0
  336. package/lib/js/node_fs.js +7 -0
  337. package/lib/js/node_module.js +1 -0
  338. package/lib/js/node_path.js +1 -0
  339. package/lib/js/node_process.js +16 -0
  340. package/lib/js/obj.js +9 -0
  341. package/lib/js/parsing.js +235 -0
  342. package/lib/js/pervasives.js +248 -0
  343. package/lib/js/printexc.js +100 -0
  344. package/lib/js/queue.js +179 -0
  345. package/lib/js/random.js +278 -0
  346. package/lib/js/set.js +953 -0
  347. package/lib/js/setLabels.js +986 -0
  348. package/lib/js/sort.js +166 -0
  349. package/lib/js/stack.js +86 -0
  350. package/lib/js/stdLabels.js +16 -0
  351. package/lib/js/stream.js +494 -0
  352. package/lib/js/string.js +335 -0
  353. package/lib/js/stringLabels.js +335 -0
  354. package/lib/js/sys.js +180 -0
  355. package/lib/js/uchar.js +131 -0
  356. package/lib/minisocket.js +93 -0
  357. package/lib/ocaml/arg.cmi +0 -0
  358. package/lib/ocaml/arg.cmt +0 -0
  359. package/lib/ocaml/arg.cmti +0 -0
  360. package/lib/ocaml/arg.ml +359 -0
  361. package/lib/ocaml/arg.mli +185 -0
  362. package/lib/ocaml/array.cmi +0 -0
  363. package/lib/ocaml/array.cmt +0 -0
  364. package/lib/ocaml/array.cmti +0 -0
  365. package/lib/ocaml/array.ml +307 -0
  366. package/lib/ocaml/array.mli +275 -0
  367. package/lib/ocaml/arrayLabels.cmi +0 -0
  368. package/lib/ocaml/arrayLabels.cmt +0 -0
  369. package/lib/ocaml/arrayLabels.cmti +0 -0
  370. package/lib/ocaml/arrayLabels.ml +307 -0
  371. package/lib/ocaml/arrayLabels.mli +276 -0
  372. package/lib/ocaml/belt.cmi +0 -0
  373. package/lib/ocaml/belt.cmt +0 -0
  374. package/lib/ocaml/belt.ml +352 -0
  375. package/lib/ocaml/belt_Array.cmi +0 -0
  376. package/lib/ocaml/belt_Array.cmt +0 -0
  377. package/lib/ocaml/belt_Array.cmti +0 -0
  378. package/lib/ocaml/belt_Array.ml +525 -0
  379. package/lib/ocaml/belt_Array.mli +707 -0
  380. package/lib/ocaml/belt_Float.cmi +0 -0
  381. package/lib/ocaml/belt_Float.cmt +0 -0
  382. package/lib/ocaml/belt_Float.cmti +0 -0
  383. package/lib/ocaml/belt_Float.ml +50 -0
  384. package/lib/ocaml/belt_Float.mli +106 -0
  385. package/lib/ocaml/belt_HashMap.cmi +0 -0
  386. package/lib/ocaml/belt_HashMap.cmt +0 -0
  387. package/lib/ocaml/belt_HashMap.cmti +0 -0
  388. package/lib/ocaml/belt_HashMap.ml +226 -0
  389. package/lib/ocaml/belt_HashMap.mli +436 -0
  390. package/lib/ocaml/belt_HashMapInt.cmi +0 -0
  391. package/lib/ocaml/belt_HashMapInt.cmt +0 -0
  392. package/lib/ocaml/belt_HashMapInt.cmti +0 -0
  393. package/lib/ocaml/belt_HashMapInt.ml +206 -0
  394. package/lib/ocaml/belt_HashMapInt.mli +50 -0
  395. package/lib/ocaml/belt_HashMapString.cmi +0 -0
  396. package/lib/ocaml/belt_HashMapString.cmt +0 -0
  397. package/lib/ocaml/belt_HashMapString.cmti +0 -0
  398. package/lib/ocaml/belt_HashMapString.ml +206 -0
  399. package/lib/ocaml/belt_HashMapString.mli +50 -0
  400. package/lib/ocaml/belt_HashSet.cmi +0 -0
  401. package/lib/ocaml/belt_HashSet.cmt +0 -0
  402. package/lib/ocaml/belt_HashSet.cmti +0 -0
  403. package/lib/ocaml/belt_HashSet.ml +196 -0
  404. package/lib/ocaml/belt_HashSet.mli +125 -0
  405. package/lib/ocaml/belt_HashSetInt.cmi +0 -0
  406. package/lib/ocaml/belt_HashSetInt.cmt +0 -0
  407. package/lib/ocaml/belt_HashSetInt.cmti +0 -0
  408. package/lib/ocaml/belt_HashSetInt.ml +155 -0
  409. package/lib/ocaml/belt_HashSetInt.mli +74 -0
  410. package/lib/ocaml/belt_HashSetString.cmi +0 -0
  411. package/lib/ocaml/belt_HashSetString.cmt +0 -0
  412. package/lib/ocaml/belt_HashSetString.cmti +0 -0
  413. package/lib/ocaml/belt_HashSetString.ml +156 -0
  414. package/lib/ocaml/belt_HashSetString.mli +74 -0
  415. package/lib/ocaml/belt_Id.cmi +0 -0
  416. package/lib/ocaml/belt_Id.cmt +0 -0
  417. package/lib/ocaml/belt_Id.cmti +0 -0
  418. package/lib/ocaml/belt_Id.ml +133 -0
  419. package/lib/ocaml/belt_Id.mli +171 -0
  420. package/lib/ocaml/belt_Int.cmi +0 -0
  421. package/lib/ocaml/belt_Int.cmt +0 -0
  422. package/lib/ocaml/belt_Int.cmti +0 -0
  423. package/lib/ocaml/belt_Int.ml +50 -0
  424. package/lib/ocaml/belt_Int.mli +103 -0
  425. package/lib/ocaml/belt_List.cmi +0 -0
  426. package/lib/ocaml/belt_List.cmt +0 -0
  427. package/lib/ocaml/belt_List.cmti +0 -0
  428. package/lib/ocaml/belt_List.ml +803 -0
  429. package/lib/ocaml/belt_List.mli +844 -0
  430. package/lib/ocaml/belt_Map.cmi +0 -0
  431. package/lib/ocaml/belt_Map.cmt +0 -0
  432. package/lib/ocaml/belt_Map.cmti +0 -0
  433. package/lib/ocaml/belt_Map.ml +170 -0
  434. package/lib/ocaml/belt_Map.mli +496 -0
  435. package/lib/ocaml/belt_MapDict.cmi +0 -0
  436. package/lib/ocaml/belt_MapDict.cmt +0 -0
  437. package/lib/ocaml/belt_MapDict.cmti +0 -0
  438. package/lib/ocaml/belt_MapDict.ml +278 -0
  439. package/lib/ocaml/belt_MapDict.mli +268 -0
  440. package/lib/ocaml/belt_MapInt.cmi +0 -0
  441. package/lib/ocaml/belt_MapInt.cmt +0 -0
  442. package/lib/ocaml/belt_MapInt.cmti +0 -0
  443. package/lib/ocaml/belt_MapInt.ml +169 -0
  444. package/lib/ocaml/belt_MapInt.mli +187 -0
  445. package/lib/ocaml/belt_MapString.cmi +0 -0
  446. package/lib/ocaml/belt_MapString.cmt +0 -0
  447. package/lib/ocaml/belt_MapString.cmti +0 -0
  448. package/lib/ocaml/belt_MapString.ml +169 -0
  449. package/lib/ocaml/belt_MapString.mli +187 -0
  450. package/lib/ocaml/belt_MutableMap.cmi +0 -0
  451. package/lib/ocaml/belt_MutableMap.cmt +0 -0
  452. package/lib/ocaml/belt_MutableMap.cmti +0 -0
  453. package/lib/ocaml/belt_MutableMap.ml +241 -0
  454. package/lib/ocaml/belt_MutableMap.mli +145 -0
  455. package/lib/ocaml/belt_MutableMapInt.cmi +0 -0
  456. package/lib/ocaml/belt_MutableMapInt.cmt +0 -0
  457. package/lib/ocaml/belt_MutableMapInt.cmti +0 -0
  458. package/lib/ocaml/belt_MutableMapInt.ml +172 -0
  459. package/lib/ocaml/belt_MutableMapInt.mli +135 -0
  460. package/lib/ocaml/belt_MutableMapString.cmi +0 -0
  461. package/lib/ocaml/belt_MutableMapString.cmt +0 -0
  462. package/lib/ocaml/belt_MutableMapString.cmti +0 -0
  463. package/lib/ocaml/belt_MutableMapString.ml +172 -0
  464. package/lib/ocaml/belt_MutableMapString.mli +135 -0
  465. package/lib/ocaml/belt_MutableQueue.cmi +0 -0
  466. package/lib/ocaml/belt_MutableQueue.cmt +0 -0
  467. package/lib/ocaml/belt_MutableQueue.cmti +0 -0
  468. package/lib/ocaml/belt_MutableQueue.ml +222 -0
  469. package/lib/ocaml/belt_MutableQueue.mli +116 -0
  470. package/lib/ocaml/belt_MutableSet.cmi +0 -0
  471. package/lib/ocaml/belt_MutableSet.cmt +0 -0
  472. package/lib/ocaml/belt_MutableSet.cmti +0 -0
  473. package/lib/ocaml/belt_MutableSet.ml +371 -0
  474. package/lib/ocaml/belt_MutableSet.mli +617 -0
  475. package/lib/ocaml/belt_MutableSetInt.cmi +0 -0
  476. package/lib/ocaml/belt_MutableSetInt.cmt +0 -0
  477. package/lib/ocaml/belt_MutableSetInt.cmti +0 -0
  478. package/lib/ocaml/belt_MutableSetInt.ml +342 -0
  479. package/lib/ocaml/belt_MutableSetInt.mli +124 -0
  480. package/lib/ocaml/belt_MutableSetString.cmi +0 -0
  481. package/lib/ocaml/belt_MutableSetString.cmt +0 -0
  482. package/lib/ocaml/belt_MutableSetString.cmti +0 -0
  483. package/lib/ocaml/belt_MutableSetString.ml +342 -0
  484. package/lib/ocaml/belt_MutableSetString.mli +124 -0
  485. package/lib/ocaml/belt_MutableStack.cmi +0 -0
  486. package/lib/ocaml/belt_MutableStack.cmt +0 -0
  487. package/lib/ocaml/belt_MutableStack.cmti +0 -0
  488. package/lib/ocaml/belt_MutableStack.ml +106 -0
  489. package/lib/ocaml/belt_MutableStack.mli +63 -0
  490. package/lib/ocaml/belt_Option.cmi +0 -0
  491. package/lib/ocaml/belt_Option.cmt +0 -0
  492. package/lib/ocaml/belt_Option.cmti +0 -0
  493. package/lib/ocaml/belt_Option.ml +93 -0
  494. package/lib/ocaml/belt_Option.mli +270 -0
  495. package/lib/ocaml/belt_Range.cmi +0 -0
  496. package/lib/ocaml/belt_Range.cmt +0 -0
  497. package/lib/ocaml/belt_Range.cmti +0 -0
  498. package/lib/ocaml/belt_Range.ml +76 -0
  499. package/lib/ocaml/belt_Range.mli +114 -0
  500. package/lib/ocaml/belt_Result.cmi +0 -0
  501. package/lib/ocaml/belt_Result.cmt +0 -0
  502. package/lib/ocaml/belt_Result.cmti +0 -0
  503. package/lib/ocaml/belt_Result.ml +75 -0
  504. package/lib/ocaml/belt_Result.mli +205 -0
  505. package/lib/ocaml/belt_Set.cmi +0 -0
  506. package/lib/ocaml/belt_Set.cmt +0 -0
  507. package/lib/ocaml/belt_Set.cmti +0 -0
  508. package/lib/ocaml/belt_Set.cppo.ml +205 -0
  509. package/lib/ocaml/belt_Set.cppo.mli +153 -0
  510. package/lib/ocaml/belt_Set.ml +164 -0
  511. package/lib/ocaml/belt_Set.mli +523 -0
  512. package/lib/ocaml/belt_SetDict.cmi +0 -0
  513. package/lib/ocaml/belt_SetDict.cmt +0 -0
  514. package/lib/ocaml/belt_SetDict.cmti +0 -0
  515. package/lib/ocaml/belt_SetDict.ml +237 -0
  516. package/lib/ocaml/belt_SetDict.mli +567 -0
  517. package/lib/ocaml/belt_SetInt.cmi +0 -0
  518. package/lib/ocaml/belt_SetInt.cmt +0 -0
  519. package/lib/ocaml/belt_SetInt.cmti +0 -0
  520. package/lib/ocaml/belt_SetInt.ml +201 -0
  521. package/lib/ocaml/belt_SetInt.mli +151 -0
  522. package/lib/ocaml/belt_SetString.cmi +0 -0
  523. package/lib/ocaml/belt_SetString.cmt +0 -0
  524. package/lib/ocaml/belt_SetString.cmti +0 -0
  525. package/lib/ocaml/belt_SetString.ml +201 -0
  526. package/lib/ocaml/belt_SetString.mli +151 -0
  527. package/lib/ocaml/belt_SortArray.cmi +0 -0
  528. package/lib/ocaml/belt_SortArray.cmt +0 -0
  529. package/lib/ocaml/belt_SortArray.cmti +0 -0
  530. package/lib/ocaml/belt_SortArray.ml +322 -0
  531. package/lib/ocaml/belt_SortArray.mli +146 -0
  532. package/lib/ocaml/belt_SortArrayInt.cmi +0 -0
  533. package/lib/ocaml/belt_SortArrayInt.cmt +0 -0
  534. package/lib/ocaml/belt_SortArrayInt.cmti +0 -0
  535. package/lib/ocaml/belt_SortArrayInt.ml +263 -0
  536. package/lib/ocaml/belt_SortArrayInt.mli +93 -0
  537. package/lib/ocaml/belt_SortArrayString.cmi +0 -0
  538. package/lib/ocaml/belt_SortArrayString.cmt +0 -0
  539. package/lib/ocaml/belt_SortArrayString.cmti +0 -0
  540. package/lib/ocaml/belt_SortArrayString.ml +263 -0
  541. package/lib/ocaml/belt_SortArrayString.mli +93 -0
  542. package/lib/ocaml/belt_internalAVLset.cmt +0 -0
  543. package/lib/ocaml/belt_internalAVLset.cmti +0 -0
  544. package/lib/ocaml/belt_internalAVLset.ml +665 -0
  545. package/lib/ocaml/belt_internalAVLset.mli +124 -0
  546. package/lib/ocaml/belt_internalAVLtree.cmt +0 -0
  547. package/lib/ocaml/belt_internalAVLtree.cmti +0 -0
  548. package/lib/ocaml/belt_internalAVLtree.ml +762 -0
  549. package/lib/ocaml/belt_internalAVLtree.mli +215 -0
  550. package/lib/ocaml/belt_internalBuckets.cmt +0 -0
  551. package/lib/ocaml/belt_internalBuckets.cmti +0 -0
  552. package/lib/ocaml/belt_internalBuckets.ml +218 -0
  553. package/lib/ocaml/belt_internalBuckets.mli +57 -0
  554. package/lib/ocaml/belt_internalBucketsType.cmt +0 -0
  555. package/lib/ocaml/belt_internalBucketsType.cmti +0 -0
  556. package/lib/ocaml/belt_internalBucketsType.ml +59 -0
  557. package/lib/ocaml/belt_internalBucketsType.mli +46 -0
  558. package/lib/ocaml/belt_internalMapInt.cmt +0 -0
  559. package/lib/ocaml/belt_internalMapInt.ml +227 -0
  560. package/lib/ocaml/belt_internalMapString.cmt +0 -0
  561. package/lib/ocaml/belt_internalMapString.ml +227 -0
  562. package/lib/ocaml/belt_internalSetBuckets.cmt +0 -0
  563. package/lib/ocaml/belt_internalSetBuckets.cmti +0 -0
  564. package/lib/ocaml/belt_internalSetBuckets.ml +157 -0
  565. package/lib/ocaml/belt_internalSetBuckets.mli +47 -0
  566. package/lib/ocaml/belt_internalSetInt.cmt +0 -0
  567. package/lib/ocaml/belt_internalSetInt.ml +129 -0
  568. package/lib/ocaml/belt_internalSetString.cmt +0 -0
  569. package/lib/ocaml/belt_internalSetString.ml +129 -0
  570. package/lib/ocaml/belt_internals.cmti +0 -0
  571. package/lib/ocaml/belt_internals.mli +79 -0
  572. package/lib/ocaml/buffer.cmi +0 -0
  573. package/lib/ocaml/buffer.cmt +0 -0
  574. package/lib/ocaml/buffer.cmti +0 -0
  575. package/lib/ocaml/buffer.ml +250 -0
  576. package/lib/ocaml/buffer.mli +149 -0
  577. package/lib/ocaml/bytes.cmi +0 -0
  578. package/lib/ocaml/bytes.cmt +0 -0
  579. package/lib/ocaml/bytes.cmti +0 -0
  580. package/lib/ocaml/bytes.ml +431 -0
  581. package/lib/ocaml/bytes.mli +430 -0
  582. package/lib/ocaml/bytesLabels.cmi +0 -0
  583. package/lib/ocaml/bytesLabels.cmt +0 -0
  584. package/lib/ocaml/bytesLabels.cmti +0 -0
  585. package/lib/ocaml/bytesLabels.ml +428 -0
  586. package/lib/ocaml/bytesLabels.mli +276 -0
  587. package/lib/ocaml/callback.cmi +0 -0
  588. package/lib/ocaml/callback.cmt +0 -0
  589. package/lib/ocaml/callback.cmti +0 -0
  590. package/lib/ocaml/callback.ml +20 -0
  591. package/lib/ocaml/callback.mli +34 -0
  592. package/lib/ocaml/camlinternalLazy.cmi +0 -0
  593. package/lib/ocaml/camlinternalLazy.cmt +0 -0
  594. package/lib/ocaml/camlinternalLazy.cmti +0 -0
  595. package/lib/ocaml/camlinternalLazy.ml +89 -0
  596. package/lib/ocaml/camlinternalLazy.mli +27 -0
  597. package/lib/ocaml/camlinternalMod.cmi +0 -0
  598. package/lib/ocaml/camlinternalMod.cmt +0 -0
  599. package/lib/ocaml/camlinternalMod.cmti +0 -0
  600. package/lib/ocaml/camlinternalMod.ml +21 -0
  601. package/lib/ocaml/camlinternalMod.mli +25 -0
  602. package/lib/ocaml/char.cmi +0 -0
  603. package/lib/ocaml/char.cmt +0 -0
  604. package/lib/ocaml/char.cmti +0 -0
  605. package/lib/ocaml/char.ml +76 -0
  606. package/lib/ocaml/char.mli +72 -0
  607. package/lib/ocaml/complex.cmi +0 -0
  608. package/lib/ocaml/complex.cmt +0 -0
  609. package/lib/ocaml/complex.cmti +0 -0
  610. package/lib/ocaml/complex.ml +87 -0
  611. package/lib/ocaml/complex.mli +86 -0
  612. package/lib/ocaml/digest.cmi +0 -0
  613. package/lib/ocaml/digest.cmt +0 -0
  614. package/lib/ocaml/digest.cmti +0 -0
  615. package/lib/ocaml/digest.ml +66 -0
  616. package/lib/ocaml/digest.mli +68 -0
  617. package/lib/ocaml/dom.cmi +0 -0
  618. package/lib/ocaml/dom.cmt +0 -0
  619. package/lib/ocaml/dom.ml +296 -0
  620. package/lib/ocaml/dom_storage.cmi +0 -0
  621. package/lib/ocaml/dom_storage.cmt +0 -0
  622. package/lib/ocaml/dom_storage.ml +22 -0
  623. package/lib/ocaml/dom_storage2.cmi +0 -0
  624. package/lib/ocaml/dom_storage2.cmt +0 -0
  625. package/lib/ocaml/dom_storage2.ml +11 -0
  626. package/lib/ocaml/filename.cmi +0 -0
  627. package/lib/ocaml/filename.cmt +0 -0
  628. package/lib/ocaml/filename.cmti +0 -0
  629. package/lib/ocaml/filename.ml +233 -0
  630. package/lib/ocaml/filename.mli +134 -0
  631. package/lib/ocaml/genlex.cmi +0 -0
  632. package/lib/ocaml/genlex.cmt +0 -0
  633. package/lib/ocaml/genlex.cmti +0 -0
  634. package/lib/ocaml/genlex.ml +201 -0
  635. package/lib/ocaml/genlex.mli +73 -0
  636. package/lib/ocaml/hashmap.cppo.ml +214 -0
  637. package/lib/ocaml/hashmap.cppo.mli +54 -0
  638. package/lib/ocaml/hashset.cppo.ml +165 -0
  639. package/lib/ocaml/hashset.cppo.mli +77 -0
  640. package/lib/ocaml/hashtbl.cmi +0 -0
  641. package/lib/ocaml/hashtbl.cmt +0 -0
  642. package/lib/ocaml/hashtbl.cmti +0 -0
  643. package/lib/ocaml/hashtbl.ml +541 -0
  644. package/lib/ocaml/hashtbl.mli +411 -0
  645. package/lib/ocaml/hashtblLabels.cmi +0 -0
  646. package/lib/ocaml/hashtblLabels.cmt +0 -0
  647. package/lib/ocaml/hashtblLabels.ml +130 -0
  648. package/lib/ocaml/int32.cmi +0 -0
  649. package/lib/ocaml/int32.cmt +0 -0
  650. package/lib/ocaml/int32.cmti +0 -0
  651. package/lib/ocaml/int32.ml +64 -0
  652. package/lib/ocaml/int32.mli +186 -0
  653. package/lib/ocaml/int64.cmi +0 -0
  654. package/lib/ocaml/int64.cmt +0 -0
  655. package/lib/ocaml/int64.cmti +0 -0
  656. package/lib/ocaml/int64.ml +72 -0
  657. package/lib/ocaml/int64.mli +197 -0
  658. package/lib/ocaml/internal_map.cppo.ml +230 -0
  659. package/lib/ocaml/internal_set.cppo.ml +134 -0
  660. package/lib/ocaml/js.cmi +0 -0
  661. package/lib/ocaml/js.cmt +0 -0
  662. package/lib/ocaml/js.ml +313 -0
  663. package/lib/ocaml/js_OO.cmi +0 -0
  664. package/lib/ocaml/js_OO.cmt +0 -0
  665. package/lib/ocaml/js_OO.ml +180 -0
  666. package/lib/ocaml/js_array.cmi +0 -0
  667. package/lib/ocaml/js_array.cmt +0 -0
  668. package/lib/ocaml/js_array.ml +970 -0
  669. package/lib/ocaml/js_array2.cmi +0 -0
  670. package/lib/ocaml/js_array2.cmt +0 -0
  671. package/lib/ocaml/js_array2.ml +1065 -0
  672. package/lib/ocaml/js_bigint.cmi +0 -0
  673. package/lib/ocaml/js_bigint.cmt +0 -0
  674. package/lib/ocaml/js_bigint.ml +3 -0
  675. package/lib/ocaml/js_cast.cmi +0 -0
  676. package/lib/ocaml/js_cast.cmt +0 -0
  677. package/lib/ocaml/js_cast.cmti +0 -0
  678. package/lib/ocaml/js_cast.ml +29 -0
  679. package/lib/ocaml/js_cast.mli +45 -0
  680. package/lib/ocaml/js_console.cmi +0 -0
  681. package/lib/ocaml/js_console.cmt +0 -0
  682. package/lib/ocaml/js_console.ml +51 -0
  683. package/lib/ocaml/js_date.cmi +0 -0
  684. package/lib/ocaml/js_date.cmt +0 -0
  685. package/lib/ocaml/js_date.ml +1263 -0
  686. package/lib/ocaml/js_dict.cmi +0 -0
  687. package/lib/ocaml/js_dict.cmt +0 -0
  688. package/lib/ocaml/js_dict.cmti +0 -0
  689. package/lib/ocaml/js_dict.ml +114 -0
  690. package/lib/ocaml/js_dict.mli +152 -0
  691. package/lib/ocaml/js_exn.cmi +0 -0
  692. package/lib/ocaml/js_exn.cmt +0 -0
  693. package/lib/ocaml/js_exn.cmti +0 -0
  694. package/lib/ocaml/js_exn.ml +102 -0
  695. package/lib/ocaml/js_exn.mli +79 -0
  696. package/lib/ocaml/js_float.cmi +0 -0
  697. package/lib/ocaml/js_float.cmt +0 -0
  698. package/lib/ocaml/js_float.ml +294 -0
  699. package/lib/ocaml/js_global.cmi +0 -0
  700. package/lib/ocaml/js_global.cmt +0 -0
  701. package/lib/ocaml/js_global.ml +185 -0
  702. package/lib/ocaml/js_int.cmi +0 -0
  703. package/lib/ocaml/js_int.cmt +0 -0
  704. package/lib/ocaml/js_int.ml +158 -0
  705. package/lib/ocaml/js_json.cmi +0 -0
  706. package/lib/ocaml/js_json.cmt +0 -0
  707. package/lib/ocaml/js_json.cmti +0 -0
  708. package/lib/ocaml/js_json.ml +195 -0
  709. package/lib/ocaml/js_json.mli +244 -0
  710. package/lib/ocaml/js_list.cmi +0 -0
  711. package/lib/ocaml/js_list.cmt +0 -0
  712. package/lib/ocaml/js_list.cmti +0 -0
  713. package/lib/ocaml/js_list.ml +174 -0
  714. package/lib/ocaml/js_list.mli +72 -0
  715. package/lib/ocaml/js_map.cmi +0 -0
  716. package/lib/ocaml/js_map.cmt +0 -0
  717. package/lib/ocaml/js_map.ml +3 -0
  718. package/lib/ocaml/js_mapperRt.cmi +0 -0
  719. package/lib/ocaml/js_mapperRt.cmt +0 -0
  720. package/lib/ocaml/js_mapperRt.cmti +0 -0
  721. package/lib/ocaml/js_mapperRt.ml +50 -0
  722. package/lib/ocaml/js_mapperRt.mli +44 -0
  723. package/lib/ocaml/js_math.cmi +0 -0
  724. package/lib/ocaml/js_math.cmt +0 -0
  725. package/lib/ocaml/js_math.ml +626 -0
  726. package/lib/ocaml/js_null.cmi +0 -0
  727. package/lib/ocaml/js_null.cmt +0 -0
  728. package/lib/ocaml/js_null.cmti +0 -0
  729. package/lib/ocaml/js_null.ml +57 -0
  730. package/lib/ocaml/js_null.mli +87 -0
  731. package/lib/ocaml/js_null_undefined.cmi +0 -0
  732. package/lib/ocaml/js_null_undefined.cmt +0 -0
  733. package/lib/ocaml/js_null_undefined.cmti +0 -0
  734. package/lib/ocaml/js_null_undefined.ml +50 -0
  735. package/lib/ocaml/js_null_undefined.mli +85 -0
  736. package/lib/ocaml/js_obj.cmi +0 -0
  737. package/lib/ocaml/js_obj.cmt +0 -0
  738. package/lib/ocaml/js_obj.ml +100 -0
  739. package/lib/ocaml/js_option.cmi +0 -0
  740. package/lib/ocaml/js_option.cmt +0 -0
  741. package/lib/ocaml/js_option.cmti +0 -0
  742. package/lib/ocaml/js_option.ml +203 -0
  743. package/lib/ocaml/js_option.mli +52 -0
  744. package/lib/ocaml/js_promise.cmi +0 -0
  745. package/lib/ocaml/js_promise.cmt +0 -0
  746. package/lib/ocaml/js_promise.ml +100 -0
  747. package/lib/ocaml/js_re.cmi +0 -0
  748. package/lib/ocaml/js_re.cmt +0 -0
  749. package/lib/ocaml/js_re.ml +184 -0
  750. package/lib/ocaml/js_result.cmi +0 -0
  751. package/lib/ocaml/js_result.cmt +0 -0
  752. package/lib/ocaml/js_result.cmti +0 -0
  753. package/lib/ocaml/js_result.ml +28 -0
  754. package/lib/ocaml/js_result.mli +28 -0
  755. package/lib/ocaml/js_set.cmi +0 -0
  756. package/lib/ocaml/js_set.cmt +0 -0
  757. package/lib/ocaml/js_set.ml +3 -0
  758. package/lib/ocaml/js_string.cmi +0 -0
  759. package/lib/ocaml/js_string.cmt +0 -0
  760. package/lib/ocaml/js_string.ml +914 -0
  761. package/lib/ocaml/js_string2.cmi +0 -0
  762. package/lib/ocaml/js_string2.cmt +0 -0
  763. package/lib/ocaml/js_string2.ml +912 -0
  764. package/lib/ocaml/js_typed_array.cmi +0 -0
  765. package/lib/ocaml/js_typed_array.cmt +0 -0
  766. package/lib/ocaml/js_typed_array.cppo.ml +429 -0
  767. package/lib/ocaml/js_typed_array.ml +1405 -0
  768. package/lib/ocaml/js_typed_array2.cmi +0 -0
  769. package/lib/ocaml/js_typed_array2.cmt +0 -0
  770. package/lib/ocaml/js_typed_array2.cppo.ml +296 -0
  771. package/lib/ocaml/js_typed_array2.ml +1269 -0
  772. package/lib/ocaml/js_types.cmi +0 -0
  773. package/lib/ocaml/js_types.cmt +0 -0
  774. package/lib/ocaml/js_types.cmti +0 -0
  775. package/lib/ocaml/js_types.ml +118 -0
  776. package/lib/ocaml/js_types.mli +78 -0
  777. package/lib/ocaml/js_undefined.cmi +0 -0
  778. package/lib/ocaml/js_undefined.cmt +0 -0
  779. package/lib/ocaml/js_undefined.cmti +0 -0
  780. package/lib/ocaml/js_undefined.ml +59 -0
  781. package/lib/ocaml/js_undefined.mli +92 -0
  782. package/lib/ocaml/js_vector.cmi +0 -0
  783. package/lib/ocaml/js_vector.cmt +0 -0
  784. package/lib/ocaml/js_vector.cmti +0 -0
  785. package/lib/ocaml/js_vector.ml +143 -0
  786. package/lib/ocaml/js_vector.mli +92 -0
  787. package/lib/ocaml/js_weakmap.cmi +0 -0
  788. package/lib/ocaml/js_weakmap.cmt +0 -0
  789. package/lib/ocaml/js_weakmap.ml +3 -0
  790. package/lib/ocaml/js_weakset.cmi +0 -0
  791. package/lib/ocaml/js_weakset.cmt +0 -0
  792. package/lib/ocaml/js_weakset.ml +3 -0
  793. package/lib/ocaml/jsx.cmi +0 -0
  794. package/lib/ocaml/jsx.cmt +0 -0
  795. package/lib/ocaml/jsx.ml +39 -0
  796. package/lib/ocaml/jsxDOM.cmi +0 -0
  797. package/lib/ocaml/jsxDOM.cmt +0 -0
  798. package/lib/ocaml/jsxDOM.ml +2087 -0
  799. package/lib/ocaml/jsxDOMStyle.cmi +0 -0
  800. package/lib/ocaml/jsxDOMStyle.cmt +0 -0
  801. package/lib/ocaml/jsxDOMStyle.ml +777 -0
  802. package/lib/ocaml/jsxEvent.cmi +0 -0
  803. package/lib/ocaml/jsxEvent.cmt +0 -0
  804. package/lib/ocaml/jsxEvent.ml +358 -0
  805. package/lib/ocaml/lazy.cmi +0 -0
  806. package/lib/ocaml/lazy.cmt +0 -0
  807. package/lib/ocaml/lazy.cmti +0 -0
  808. package/lib/ocaml/lazy.ml +70 -0
  809. package/lib/ocaml/lazy.mli +95 -0
  810. package/lib/ocaml/lexing.cmi +0 -0
  811. package/lib/ocaml/lexing.cmt +0 -0
  812. package/lib/ocaml/lexing.cmti +0 -0
  813. package/lib/ocaml/lexing.ml +230 -0
  814. package/lib/ocaml/lexing.mli +172 -0
  815. package/lib/ocaml/list.cmi +0 -0
  816. package/lib/ocaml/list.cmt +0 -0
  817. package/lib/ocaml/list.cmti +0 -0
  818. package/lib/ocaml/list.ml +485 -0
  819. package/lib/ocaml/list.mli +347 -0
  820. package/lib/ocaml/listLabels.cmi +0 -0
  821. package/lib/ocaml/listLabels.cmt +0 -0
  822. package/lib/ocaml/listLabels.cmti +0 -0
  823. package/lib/ocaml/listLabels.ml +485 -0
  824. package/lib/ocaml/listLabels.mli +353 -0
  825. package/lib/ocaml/map.cmi +0 -0
  826. package/lib/ocaml/map.cmt +0 -0
  827. package/lib/ocaml/map.cmti +0 -0
  828. package/lib/ocaml/map.cppo.ml +174 -0
  829. package/lib/ocaml/map.cppo.mli +191 -0
  830. package/lib/ocaml/map.ml +480 -0
  831. package/lib/ocaml/map.mli +315 -0
  832. package/lib/ocaml/mapLabels.cmi +0 -0
  833. package/lib/ocaml/mapLabels.cmt +0 -0
  834. package/lib/ocaml/mapLabels.ml +480 -0
  835. package/lib/ocaml/mapm.cppo.ml +177 -0
  836. package/lib/ocaml/mapm.cppo.mli +138 -0
  837. package/lib/ocaml/moreLabels.cmi +0 -0
  838. package/lib/ocaml/moreLabels.cmt +0 -0
  839. package/lib/ocaml/moreLabels.cmti +0 -0
  840. package/lib/ocaml/moreLabels.ml +22 -0
  841. package/lib/ocaml/moreLabels.mli +198 -0
  842. package/lib/ocaml/node.cmi +0 -0
  843. package/lib/ocaml/node.cmt +0 -0
  844. package/lib/ocaml/node.ml +84 -0
  845. package/lib/ocaml/node_buffer.cmi +0 -0
  846. package/lib/ocaml/node_buffer.cmt +0 -0
  847. package/lib/ocaml/node_buffer.ml +47 -0
  848. package/lib/ocaml/node_child_process.cmi +0 -0
  849. package/lib/ocaml/node_child_process.cmt +0 -0
  850. package/lib/ocaml/node_child_process.ml +50 -0
  851. package/lib/ocaml/node_fs.cmi +0 -0
  852. package/lib/ocaml/node_fs.cmt +0 -0
  853. package/lib/ocaml/node_fs.ml +153 -0
  854. package/lib/ocaml/node_module.cmi +0 -0
  855. package/lib/ocaml/node_module.cmt +0 -0
  856. package/lib/ocaml/node_module.ml +29 -0
  857. package/lib/ocaml/node_path.cmi +0 -0
  858. package/lib/ocaml/node_path.cmt +0 -0
  859. package/lib/ocaml/node_path.ml +71 -0
  860. package/lib/ocaml/node_process.cmi +0 -0
  861. package/lib/ocaml/node_process.cmt +0 -0
  862. package/lib/ocaml/node_process.cmti +0 -0
  863. package/lib/ocaml/node_process.ml +59 -0
  864. package/lib/ocaml/node_process.mli +48 -0
  865. package/lib/ocaml/obj.cmi +0 -0
  866. package/lib/ocaml/obj.cmt +0 -0
  867. package/lib/ocaml/obj.cmti +0 -0
  868. package/lib/ocaml/obj.ml +29 -0
  869. package/lib/ocaml/obj.mli +62 -0
  870. package/lib/ocaml/parsing.cmi +0 -0
  871. package/lib/ocaml/parsing.cmt +0 -0
  872. package/lib/ocaml/parsing.cmti +0 -0
  873. package/lib/ocaml/parsing.ml +212 -0
  874. package/lib/ocaml/parsing.mli +105 -0
  875. package/lib/ocaml/pervasives.cmi +0 -0
  876. package/lib/ocaml/pervasives.cmt +0 -0
  877. package/lib/ocaml/pervasives.cmti +0 -0
  878. package/lib/ocaml/pervasives.ml +297 -0
  879. package/lib/ocaml/pervasives.mli +771 -0
  880. package/lib/ocaml/printexc.cmi +0 -0
  881. package/lib/ocaml/printexc.cmt +0 -0
  882. package/lib/ocaml/printexc.cmti +0 -0
  883. package/lib/ocaml/printexc.ml +79 -0
  884. package/lib/ocaml/printexc.mli +57 -0
  885. package/lib/ocaml/queue.cmi +0 -0
  886. package/lib/ocaml/queue.cmt +0 -0
  887. package/lib/ocaml/queue.cmti +0 -0
  888. package/lib/ocaml/queue.ml +132 -0
  889. package/lib/ocaml/queue.mli +82 -0
  890. package/lib/ocaml/random.cmi +0 -0
  891. package/lib/ocaml/random.cmt +0 -0
  892. package/lib/ocaml/random.cmti +0 -0
  893. package/lib/ocaml/random.ml +273 -0
  894. package/lib/ocaml/random.mli +102 -0
  895. package/lib/ocaml/set.cmi +0 -0
  896. package/lib/ocaml/set.cmt +0 -0
  897. package/lib/ocaml/set.cmti +0 -0
  898. package/lib/ocaml/set.ml +526 -0
  899. package/lib/ocaml/set.mli +266 -0
  900. package/lib/ocaml/setLabels.cmi +0 -0
  901. package/lib/ocaml/setLabels.cmt +0 -0
  902. package/lib/ocaml/setLabels.ml +526 -0
  903. package/lib/ocaml/setm.cppo.ml +346 -0
  904. package/lib/ocaml/setm.cppo.mli +126 -0
  905. package/lib/ocaml/sort.cmi +0 -0
  906. package/lib/ocaml/sort.cmt +0 -0
  907. package/lib/ocaml/sort.cmti +0 -0
  908. package/lib/ocaml/sort.cppo.ml +267 -0
  909. package/lib/ocaml/sort.cppo.mli +96 -0
  910. package/lib/ocaml/sort.ml +99 -0
  911. package/lib/ocaml/sort.mli +44 -0
  912. package/lib/ocaml/stack.cmi +0 -0
  913. package/lib/ocaml/stack.cmt +0 -0
  914. package/lib/ocaml/stack.cmti +0 -0
  915. package/lib/ocaml/stack.ml +44 -0
  916. package/lib/ocaml/stack.mli +63 -0
  917. package/lib/ocaml/stdLabels.cmi +0 -0
  918. package/lib/ocaml/stdLabels.cmt +0 -0
  919. package/lib/ocaml/stdLabels.cmti +0 -0
  920. package/lib/ocaml/stdLabels.ml +24 -0
  921. package/lib/ocaml/stdLabels.mli +29 -0
  922. package/lib/ocaml/stream.cmi +0 -0
  923. package/lib/ocaml/stream.cmt +0 -0
  924. package/lib/ocaml/stream.cmti +0 -0
  925. package/lib/ocaml/stream.ml +213 -0
  926. package/lib/ocaml/stream.mli +108 -0
  927. package/lib/ocaml/string.cmi +0 -0
  928. package/lib/ocaml/string.cmt +0 -0
  929. package/lib/ocaml/string.cmti +0 -0
  930. package/lib/ocaml/string.ml +190 -0
  931. package/lib/ocaml/string.mli +286 -0
  932. package/lib/ocaml/stringLabels.cmi +0 -0
  933. package/lib/ocaml/stringLabels.cmt +0 -0
  934. package/lib/ocaml/stringLabels.cmti +0 -0
  935. package/lib/ocaml/stringLabels.ml +190 -0
  936. package/lib/ocaml/stringLabels.mli +241 -0
  937. package/lib/ocaml/sys.cmi +0 -0
  938. package/lib/ocaml/sys.cmt +0 -0
  939. package/lib/ocaml/sys.cmti +0 -0
  940. package/lib/ocaml/sys.ml +135 -0
  941. package/lib/ocaml/sys.mli +333 -0
  942. package/lib/ocaml/uchar.cmi +0 -0
  943. package/lib/ocaml/uchar.cmt +0 -0
  944. package/lib/ocaml/uchar.cmti +0 -0
  945. package/lib/ocaml/uchar.ml +58 -0
  946. package/lib/ocaml/uchar.mli +98 -0
  947. package/linux/bsb_helper.exe +0 -0
  948. package/linux/bsc.exe +0 -0
  949. package/linux/ninja.COPYING +202 -0
  950. package/linux/ninja.exe +0 -0
  951. package/linux/refmt.exe +0 -0
  952. package/linux/rescript.exe +0 -0
  953. package/openbsd/.keep +0 -0
  954. package/package.json +71 -0
  955. package/rescript +591 -0
  956. package/scripts/LICENSE.ml +27 -0
  957. package/scripts/bin_path.js +38 -0
  958. package/scripts/buckle_lto.js +55 -0
  959. package/scripts/build_sorted.ml +233 -0
  960. package/scripts/buildocaml.js +102 -0
  961. package/scripts/caml_oo_curry_gen.ml +71 -0
  962. package/scripts/checkUnused.js +63 -0
  963. package/scripts/ciTest.js +172 -0
  964. package/scripts/config.js +24 -0
  965. package/scripts/cover.sh +3 -0
  966. package/scripts/curry_gen.ml +167 -0
  967. package/scripts/dbg +13 -0
  968. package/scripts/dedupe.js +44 -0
  969. package/scripts/doc_gen.js +117 -0
  970. package/scripts/install.js +237 -0
  971. package/scripts/installUtils.js +61 -0
  972. package/scripts/js_internal_gen.js +135 -0
  973. package/scripts/jsconfig.json +12 -0
  974. package/scripts/littlecase.js +21 -0
  975. package/scripts/ninja.js +1980 -0
  976. package/scripts/ninjaFactory.js +36 -0
  977. package/scripts/pack.js +107 -0
  978. package/scripts/prebuilt.js +99 -0
  979. package/scripts/release.js +41 -0
  980. package/scripts/repl.js +151 -0
  981. package/scripts/rescript_arg.js +168 -0
  982. package/scripts/rescript_convert.js +128 -0
  983. package/scripts/rescript_dump.js +48 -0
  984. package/scripts/rescript_format.js +194 -0
  985. package/scripts/shake.js +138 -0
  986. package/scripts/tasks.js +149 -0
  987. package/scripts/test.sh +3 -0
  988. package/scripts/tmp.js +98 -0
  989. package/scripts/validate.js +41 -0
  990. package/vendor/ninja.tar.gz +0 -0
  991. package/vendor/ocaml.tar.gz +0 -0
  992. package/win32/bsb_helper.exe +0 -0
  993. package/win32/bsc.exe +0 -0
  994. package/win32/ninja.COPYING +202 -0
  995. package/win32/ninja.exe +0 -0
  996. package/win32/refmt.exe +0 -0
  997. package/win32/rescript.exe +0 -0
@@ -0,0 +1,912 @@
1
+ (* Copyright (C) 2015-2016 Bloomberg Finance L.P.
2
+ *
3
+ * This program is free software: you can redistribute it and/or modify
4
+ * it under the terms of the GNU Lesser General Public License as published by
5
+ * the Free Software Foundation, either version 3 of the License, or
6
+ * (at your option) any later version.
7
+ *
8
+ * In addition to the permissions granted to you by the LGPL, you may combine
9
+ * or link a "work that uses the Library" with a publicly distributed version
10
+ * of this file to produce a combined library or application, then distribute
11
+ * that combined work under the terms of your choosing, with no requirement
12
+ * to comply with the obligations normally placed on you by section 4 of the
13
+ * LGPL version 3 (or the corresponding section of a later version of the LGPL
14
+ * should you choose to use a later version).
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU Lesser General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU Lesser General Public License
22
+ * along with this program; if not, write to the Free Software
23
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *)
24
+
25
+ (** Provide bindings to JS string. Optimized for pipe-first. *)
26
+
27
+ type t = string
28
+
29
+ external make : 'a -> t = "String"
30
+ [@@bs.val]
31
+ (**
32
+ `make(value)` converts the given value to a `string`.
33
+
34
+ ```res example
35
+ Js.String2.make(3.5) == "3.5"
36
+ Js.String2.make([1, 2, 3]) == "1,2,3"
37
+ ```
38
+ *)
39
+
40
+ external fromCharCode : int -> t = "String.fromCharCode"
41
+ [@@bs.val]
42
+ (**
43
+ `fromCharCode(n)` creates a `string` containing the character corresponding to
44
+ that number; `n` ranges from 0 to 65535.If out of range, the lower 16 bits of
45
+ the value are used. Thus, `fromCharCode(0x1F63A)` gives the same result as
46
+ `fromCharCode(0xF63A)`.
47
+
48
+ See [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)
49
+ on MDN.
50
+
51
+ ```res example
52
+ Js.String2.fromCharCode(65) == "A"
53
+ Js.String2.fromCharCode(0x3c8) == `ψ`
54
+ Js.String2.fromCharCode(0xd55c) == `한`
55
+ Js.String2.fromCharCode(-64568) == `ψ`
56
+ ```
57
+ *)
58
+
59
+ external fromCharCodeMany : int array -> t = "String.fromCharCode"
60
+ [@@bs.val] [@@bs.splice]
61
+ (**
62
+ `fromCharCodeMany([n1, n2, n3])` creates a `string` from the characters
63
+ corresponding to the given numbers, using the same rules as `fromCharCode`.
64
+
65
+ See [`String.fromCharCode`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode)
66
+ on MDN.
67
+ *)
68
+
69
+ external fromCodePoint : int -> t = "String.fromCodePoint"
70
+ [@@bs.val]
71
+ (**
72
+ `fromCodePoint(n)` creates a `string` containing the character corresponding to
73
+ that numeric code point. If the number is not a valid code point, it raises
74
+ `RangeError`. Thus, `fromCodePoint(0x1F63A)` will produce a correct value,
75
+ unlike `fromCharCode(0x1F63A)`, and `fromCodePoint(-5)` will raise a
76
+ `RangeError`.
77
+
78
+ See [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)
79
+ on MDN.
80
+
81
+ ```res example
82
+ Js.String2.fromCodePoint(65) == "A"
83
+ Js.String2.fromCodePoint(0x3c8) == `ψ`
84
+ Js.String2.fromCodePoint(0xd55c) == `한`
85
+ Js.String2.fromCodePoint(0x1f63a) == `😺`
86
+ ```
87
+ *)
88
+
89
+ external fromCodePointMany : int array -> t = "String.fromCodePoint"
90
+ [@@bs.val] [@@bs.splice]
91
+ (**
92
+ `fromCodePointMany([n1, n2, n3])` creates a `string` from the characters
93
+ corresponding to the given code point numbers, using the same rules as
94
+ `fromCodePoint`.
95
+
96
+ See [`String.fromCodePoint`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCodePoint)
97
+ on MDN.
98
+
99
+ ```res example
100
+ Js.String2.fromCodePointMany([0xd55c, 0xae00, 0x1f63a]) == `한글😺`
101
+ ```
102
+ *)
103
+
104
+ (* String.raw: ES2015, meant to be used with template strings, not directly *)
105
+
106
+ external length : t -> int = "length"
107
+ [@@bs.get]
108
+ (**
109
+ `length(s)` returns the length of the given `string`.
110
+
111
+ See [`String.length`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length)
112
+ on MDN.
113
+
114
+ ```res example
115
+ Js.String2.length("abcd") == 4
116
+ ```
117
+ *)
118
+
119
+ external get : t -> int -> t = ""
120
+ [@@bs.get_index]
121
+ (**
122
+ `get(s, n)` returns as a `string` the character at the given index number. If
123
+ `n` is out of range, this function returns `undefined`,so at some point this
124
+ function may be modified to return `option(string)`.
125
+
126
+ ```res example
127
+ Js.String2.get("Reason", 0) == "R"
128
+ Js.String2.get("Reason", 4) == "o"
129
+ Js.String2.get(`Rẽasöń`, 5) == `ń`
130
+ ```
131
+ *)
132
+
133
+ external charAt : t -> int -> t = "charAt"
134
+ [@@bs.send]
135
+ (**
136
+ `charAt(s, n)` gets the character at index `n` within string `s`. If `n` is
137
+ negative or greater than the length of `s`, it returns the empty string. If the
138
+ string contains characters outside the range \u0000-\uffff, it will return the
139
+ first 16-bit value at that position in the string.
140
+
141
+ See [`String.charAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charAt)
142
+ on MDN.
143
+
144
+ ```res example
145
+ Js.String2.charAt("Reason", 0) == "R"
146
+ Js.String2.charAt("Reason", 12) == ""
147
+ Js.String2.charAt(`Rẽasöń`, 5) == `ń`
148
+ ```
149
+ *)
150
+
151
+ external charCodeAt : t -> int -> float = "charCodeAt"
152
+ [@@bs.send]
153
+ (**
154
+ `charCodeAt(s, n)` returns the character code at position `n` in string `s`;
155
+ the result is in the range 0-65535, unlke `codePointAt`, so it will not work
156
+ correctly for characters with code points greater than or equal to 0x10000. The
157
+ return type is `float` because this function returns NaN if `n` is less than
158
+ zero or greater than the length of the string.
159
+
160
+ See [`String.charCodeAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/charCodeAt)
161
+ on MDN.
162
+
163
+ ```res example
164
+ Js.String2.charCodeAt(`😺`, 0) == 0xd83d->Belt.Int.toFloat
165
+ Js.String2.codePointAt(`😺`, 0) == Some(0x1f63a)
166
+ ```
167
+ *)
168
+
169
+ external codePointAt : t -> int -> int option = "codePointAt"
170
+ [@@bs.send]
171
+ (**
172
+ `codePointAt(s, n)` returns the code point at position `n` within string `s` as
173
+ a `Some(value)`. The return value handles code points greater than or equal to
174
+ 0x10000. If there is no code point at the given position, the function returns
175
+ `None`.
176
+
177
+ See [`String.codePointAt`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt)
178
+ on MDN.
179
+
180
+ ```res example
181
+ Js.String2.codePointAt(`¿😺?`, 1) == Some(0x1f63a)
182
+ Js.String2.codePointAt("abc", 5) == None
183
+ ```
184
+ *)
185
+
186
+ external concat : t -> t -> t = "concat"
187
+ [@@bs.send]
188
+ (**
189
+ `concat(original, append)` returns a new `string` with `append` added after
190
+ `original`.
191
+
192
+ See [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat)
193
+ on MDN.
194
+
195
+ ```res example
196
+ Js.String2.concat("cow", "bell") == "cowbell"
197
+ ```
198
+ *)
199
+
200
+ external concatMany : t -> t array -> t = "concat"
201
+ [@@bs.send] [@@bs.splice]
202
+ (**
203
+ `concatMany(original, arr)` returns a new `string` consisting of each item of an
204
+ array of strings added to the `original` string.
205
+
206
+ See [`String.concat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/concat)
207
+ on MDN.
208
+
209
+ ```res example
210
+ Js.String2.concatMany("1st", ["2nd", "3rd", "4th"]) == "1st2nd3rd4th"
211
+ ```
212
+ *)
213
+
214
+ external endsWith : t -> t -> bool = "endsWith"
215
+ [@@bs.send]
216
+ (**
217
+ ES2015: `endsWith(str, substr)` returns `true` if the `str` ends with `substr`,
218
+ `false` otherwise.
219
+
220
+ See [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith)
221
+ on MDN.
222
+
223
+ ```res example
224
+ Js.String2.endsWith("BuckleScript", "Script") == true
225
+ Js.String2.endsWith("BuckleShoes", "Script") == false
226
+ ```
227
+ *)
228
+
229
+ external endsWithFrom : t -> t -> int -> bool = "endsWith"
230
+ [@@bs.send]
231
+ (**
232
+ `endsWithFrom(str, ending, len)` returns `true` if the first len characters of
233
+ `str` end with `ending`, `false` otherwise. If `len` is greater than or equal
234
+ to the length of `str`, then it works like `endsWith`. (Honestly, this should
235
+ have been named endsWithAt, but oh well).
236
+
237
+ See [`String.endsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith)
238
+ on MDN.
239
+
240
+ ```res example
241
+ Js.String2.endsWithFrom("abcd", "cd", 4) == true
242
+ Js.String2.endsWithFrom("abcde", "cd", 3) == false
243
+ Js.String2.endsWithFrom("abcde", "cde", 99) == true
244
+ Js.String2.endsWithFrom("example.dat", "ple", 7) == true
245
+ ```
246
+ *)
247
+
248
+ external includes : t -> t -> bool = "includes"
249
+ [@@bs.send]
250
+ (**
251
+ ES2015: `includes(str, searchValue)` returns `true` if `searchValue` is found
252
+ anywhere within `str`, false otherwise.
253
+
254
+ See [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)
255
+ on MDN.
256
+
257
+ ```res example
258
+ Js.String2.includes("programmer", "gram") == true
259
+ Js.String2.includes("programmer", "er") == true
260
+ Js.String2.includes("programmer", "pro") == true
261
+ Js.String2.includes("programmer.dat", "xyz") == false
262
+ ```
263
+ *)
264
+
265
+ external includesFrom : t -> t -> int -> bool = "includes"
266
+ [@@bs.send]
267
+ (**
268
+ ES2015: `includes(str, searchValue start)` returns `true` if `searchValue` is
269
+ found anywhere within `str` starting at character number `start` (where 0 is
270
+ the first character), `false` otherwise.
271
+
272
+ See [`String.includes`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes)
273
+ on MDN.
274
+
275
+ ```res example
276
+ Js.String2.includesFrom("programmer", "gram", 1) == true
277
+ Js.String2.includesFrom("programmer", "gram", 4) == false
278
+ Js.String2.includesFrom(`대한민국`, `한`, 1) == true
279
+ ```
280
+ *)
281
+
282
+ external indexOf : t -> t -> int = "indexOf"
283
+ [@@bs.send]
284
+ (**
285
+ ES2015: `indexOf(str, searchValue)` returns the position at which `searchValue`
286
+ was first found within `str`, or -1 if `searchValue` is not in `str`.
287
+
288
+ See [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf)
289
+ on MDN.
290
+
291
+ ```res example
292
+ Js.String2.indexOf("bookseller", "ok") == 2
293
+ Js.String2.indexOf("bookseller", "sell") == 4
294
+ Js.String2.indexOf("beekeeper", "ee") == 1
295
+ Js.String2.indexOf("bookseller", "xyz") == -1
296
+ ```
297
+ *)
298
+
299
+ external indexOfFrom : t -> t -> int -> int = "indexOf"
300
+ [@@bs.send]
301
+ (**
302
+ `indexOfFrom(str, searchValue, start)` returns the position at which
303
+ `searchValue` was found within `str` starting at character position `start`, or
304
+ -1 if `searchValue` is not found in that portion of `str`. The return value is
305
+ relative to the beginning of the string, no matter where the search started
306
+ from.
307
+
308
+ See [`String.indexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/indexOf)
309
+ on MDN.
310
+
311
+ ```res example
312
+ Js.String2.indexOfFrom("bookseller", "ok", 1) == 2
313
+ Js.String2.indexOfFrom("bookseller", "sell", 2) == 4
314
+ Js.String2.indexOfFrom("bookseller", "sell", 5) == -1
315
+ ```
316
+ *)
317
+
318
+ external lastIndexOf : t -> t -> int = "lastIndexOf"
319
+ [@@bs.send]
320
+ (**
321
+ `lastIndexOf(str, searchValue)` returns the position of the last occurrence of
322
+ `searchValue` within `str`, searching backwards from the end of the string.
323
+ Returns -1 if `searchValue` is not in `str`. The return value is always
324
+ relative to the beginning of the string.
325
+
326
+ See [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf)
327
+ on MDN.
328
+
329
+ ```res example
330
+ Js.String2.lastIndexOf("bookseller", "ok") == 2
331
+ Js.String2.lastIndexOf("beekeeper", "ee") == 4
332
+ Js.String2.lastIndexOf("abcdefg", "xyz") == -1
333
+ ```
334
+ *)
335
+
336
+ external lastIndexOfFrom : t -> t -> int -> int = "lastIndexOf"
337
+ [@@bs.send]
338
+ (**
339
+ `lastIndexOfFrom(str, searchValue, start)` returns the position of the last
340
+ occurrence of `searchValue` within `str`, searching backwards from the given
341
+ start position. Returns -1 if `searchValue` is not in `str`. The return value
342
+ is always relative to the beginning of the string.
343
+
344
+ See [`String.lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/lastIndexOf)
345
+ on MDN.
346
+
347
+ ```res example
348
+ Js.String2.lastIndexOfFrom("bookseller", "ok", 6) == 2
349
+ Js.String2.lastIndexOfFrom("beekeeper", "ee", 8) == 4
350
+ Js.String2.lastIndexOfFrom("beekeeper", "ee", 3) == 1
351
+ Js.String2.lastIndexOfFrom("abcdefg", "xyz", 4) == -1
352
+ ```
353
+ *)
354
+
355
+ (* extended by ECMA-402 *)
356
+
357
+ external localeCompare : t -> t -> float = "localeCompare"
358
+ [@@bs.send]
359
+ (**
360
+ `localeCompare(reference, comparison)` returns
361
+ - a negative value if reference comes before comparison in sort order
362
+ - zero if reference and comparison have the same sort order
363
+ - a positive value if reference comes after comparison in sort order
364
+
365
+ See [`String.localeCompare`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare) on MDN.
366
+
367
+ ```res example
368
+ Js.String2.localeCompare("zebra", "ant") > 0.0
369
+ Js.String2.localeCompare("ant", "zebra") < 0.0
370
+ Js.String2.localeCompare("cat", "cat") == 0.0
371
+ Js.String2.localeCompare("CAT", "cat") > 0.0
372
+ ```
373
+ *)
374
+
375
+ external match_ : t -> Js_re.t -> t option array option = "match"
376
+ [@@bs.send] [@@bs.return { null_to_opt }]
377
+ (**
378
+ `match(str, regexp)` matches a `string` against the given `regexp`. If there is
379
+ no match, it returns `None`. For regular expressions without the g modifier, if
380
+ there is a match, the return value is `Some(array)` where the array contains:
381
+ - The entire matched string
382
+ - Any capture groups if the regexp had parentheses
383
+ For regular expressions with the g modifier, a matched expression returns
384
+ `Some(array)` with all the matched substrings and no capture groups.
385
+
386
+ See [`String.match`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match)
387
+ on MDN.
388
+
389
+ ```res example
390
+ Js.String2.match_("The better bats", %re("/b[aeiou]t/")) == Some(["bet"])
391
+ Js.String2.match_("The better bats", %re("/b[aeiou]t/g")) == Some(["bet", "bat"])
392
+ Js.String2.match_("Today is 2018-04-05.", %re("/(\d+)-(\d+)-(\d+)/")) ==
393
+ Some(["2018-04-05", "2018", "04", "05"])
394
+ Js.String2.match_("The large container.", %re("/b[aeiou]g/")) == None
395
+ ```
396
+ *)
397
+
398
+ external normalize : t -> t = "normalize"
399
+ [@@bs.send]
400
+ (**
401
+ `normalize(str)` returns the normalized Unicode string using Normalization Form
402
+ Canonical (NFC) Composition. Consider the character ã, which can be represented
403
+ as the single codepoint \u00e3 or the combination of a lower case letter A
404
+ \u0061 and a combining tilde \u0303. Normalization ensures that both can be
405
+ stored in an equivalent binary representation.
406
+
407
+ See [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
408
+ on MDN. See also [Unicode technical report
409
+ #15](https://unicode.org/reports/tr15/) for details.
410
+ *)
411
+
412
+ external normalizeByForm : t -> t -> t = "normalize"
413
+ [@@bs.send]
414
+ (**
415
+ ES2015: `normalize(str, form)` returns the normalized Unicode string using the
416
+ specified form of normalization, which may be one of:
417
+ - "NFC" — Normalization Form Canonical Composition.
418
+ - "NFD" — Normalization Form Canonical Decomposition.
419
+ - "NFKC" — Normalization Form Compatibility Composition.
420
+ - "NFKD" — Normalization Form Compatibility Decomposition.
421
+
422
+ See [`String.normalize`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize) on MDN.
423
+ See also [Unicode technical report #15](https://unicode.org/reports/tr15/) for details.
424
+ *)
425
+
426
+ external repeat : t -> int -> t = "repeat"
427
+ [@@bs.send]
428
+ (**
429
+ `repeat(str, n)` returns a `string` that consists of `n` repetitions of `str`.
430
+ Raises `RangeError` if `n` is negative.
431
+
432
+ See [`String.repeat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat)
433
+ on MDN.
434
+
435
+ ```res example
436
+ Js.String2.repeat("ha", 3) == "hahaha"
437
+ Js.String2.repeat("empty", 0) == ""
438
+ ```
439
+ *)
440
+
441
+ external replace : t -> t -> t -> t = "replace"
442
+ [@@bs.send]
443
+ (**
444
+ ES2015: `replace(str, substr, newSubstr)` returns a new `string` which is
445
+ identical to `str` except with the first matching instance of `substr` replaced
446
+ by `newSubstr`. `substr` is treated as a verbatim string to match, not a
447
+ regular expression.
448
+
449
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
450
+ on MDN.
451
+
452
+ ```res example
453
+ Js.String2.replace("old string", "old", "new") == "new string"
454
+ Js.String2.replace("the cat and the dog", "the", "this") == "this cat and the dog"
455
+ ```
456
+ *)
457
+
458
+ external replaceByRe : t -> Js_re.t -> t -> t = "replace"
459
+ [@@bs.send]
460
+ (**
461
+ `replaceByRe(str, regex, replacement)` returns a new `string` where occurrences
462
+ matching regex have been replaced by `replacement`.
463
+
464
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
465
+ on MDN.
466
+
467
+ ```res example
468
+ Js.String2.replaceByRe("vowels be gone", %re("/[aeiou]/g"), "x") == "vxwxls bx gxnx"
469
+ Js.String2.replaceByRe("Juan Fulano", %re("/(\w+) (\w+)/"), "$2, $1") == "Fulano, Juan"
470
+ ```
471
+ *)
472
+
473
+ external unsafeReplaceBy0 :
474
+ t -> Js_re.t -> ((t -> int -> t -> t)[@bs.uncurry]) -> t = "replace"
475
+ [@@bs.send]
476
+ (**
477
+ Returns a new `string` with some or all matches of a pattern with no capturing
478
+ parentheses replaced by the value returned from the given function. The
479
+ function receives as its parameters the matched string, the offset at which the
480
+ match begins, and the whole string being matched.
481
+
482
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
483
+ on MDN.
484
+
485
+ ```res example
486
+ let str = "beautiful vowels"
487
+ let re = %re("/[aeiou]/g")
488
+ let matchFn = (matchPart, _offset, _wholeString) => Js.String2.toUpperCase(matchPart)
489
+
490
+ Js.String2.unsafeReplaceBy0(str, re, matchFn) == "bEAUtIfUl vOwEls"
491
+ ```
492
+ *)
493
+
494
+ external unsafeReplaceBy1 :
495
+ t -> Js_re.t -> ((t -> t -> int -> t -> t)[@bs.uncurry]) -> t = "replace"
496
+ [@@bs.send]
497
+ (**
498
+ Returns a new `string` with some or all matches of a pattern with one set of
499
+ capturing parentheses replaced by the value returned from the given function.
500
+ The function receives as its parameters the matched string, the captured
501
+ string, the offset at which the match begins, and the whole string being
502
+ matched.
503
+
504
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
505
+ on MDN.
506
+
507
+ ```res example
508
+ let str = "Jony is 40"
509
+ let re = %re("/(Jony is )\d+/g")
510
+ let matchFn = (_match, part1, _offset, _wholeString) => {
511
+ part1 ++ "41"
512
+ }
513
+
514
+ Js.String2.unsafeReplaceBy1(str, re, matchFn) == "Jony is 41"
515
+ ```
516
+ *)
517
+
518
+ external unsafeReplaceBy2 :
519
+ t -> Js_re.t -> ((t -> t -> t -> int -> t -> t)[@bs.uncurry]) -> t = "replace"
520
+ [@@bs.send]
521
+ (**
522
+ Returns a new `string` with some or all matches of a pattern with two sets of
523
+ capturing parentheses replaced by the value returned from the given function.
524
+ The function receives as its parameters the matched string, the captured
525
+ strings, the offset at which the match begins, and the whole string being
526
+ matched.
527
+
528
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
529
+ on MDN.
530
+
531
+ ```res example
532
+ let str = "7 times 6"
533
+ let re = %re("/(\d+) times (\d+)/")
534
+ let matchFn = (_match, p1, p2, _offset, _wholeString) => {
535
+ switch (Belt.Int.fromString(p1), Belt.Int.fromString(p2)) {
536
+ | (Some(x), Some(y)) => Belt.Int.toString(x * y)
537
+ | _ => "???"
538
+ }
539
+ }
540
+
541
+ Js.String2.unsafeReplaceBy2(str, re, matchFn) == "42"
542
+ ```
543
+ *)
544
+
545
+ external unsafeReplaceBy3 :
546
+ t -> Js_re.t -> ((t -> t -> t -> t -> int -> t -> t)[@bs.uncurry]) -> t
547
+ = "replace"
548
+ [@@bs.send]
549
+ (**
550
+ Returns a new `string` with some or all matches of a pattern with three sets of
551
+ capturing parentheses replaced by the value returned from the given function.
552
+ The function receives as its parameters the matched string, the captured
553
+ strings, the offset at which the match begins, and the whole string being
554
+ matched.
555
+
556
+ See [`String.replace`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace)
557
+ on MDN.
558
+ *)
559
+
560
+ external search : t -> Js_re.t -> int = "search"
561
+ [@@bs.send]
562
+ (**
563
+ `search(str, regexp)` returns the starting position of the first match of
564
+ `regexp` in the given `str`, or -1 if there is no match.
565
+
566
+ See [`String.search`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/search)
567
+ on MDN.
568
+
569
+ ```res example
570
+ Js.String2.search("testing 1 2 3", %re("/\d+/")) == 8
571
+ Js.String2.search("no numbers", %re("/\d+/")) == -1
572
+ ```
573
+ *)
574
+
575
+ external slice : t -> from:int -> to_:int -> t = "slice"
576
+ [@@bs.send]
577
+ (**
578
+ `slice(str, from:n1, to_:n2)` returns the substring of `str` starting at
579
+ character `n1` up to but not including `n2`.
580
+ - If either `n1` or `n2` is negative, then it is evaluated as `length(str - n1)` or `length(str - n2)`.
581
+ - If `n2` is greater than the length of `str`, then it is treated as `length(str)`.
582
+ - If `n1` is greater than `n2`, slice returns the empty string.
583
+
584
+ See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.
585
+
586
+ ```res example
587
+ Js.String2.slice("abcdefg", ~from=2, ~to_=5) == "cde"
588
+ Js.String2.slice("abcdefg", ~from=2, ~to_=9) == "cdefg"
589
+ Js.String2.slice("abcdefg", ~from=-4, ~to_=-2) == "de"
590
+ Js.String2.slice("abcdefg", ~from=5, ~to_=1) == ""
591
+ ```
592
+ *)
593
+
594
+ external sliceToEnd : t -> from:int -> t = "slice"
595
+ [@@bs.send]
596
+ (**
597
+ `sliceToEnd(str, from:n)` returns the substring of `str` starting at character
598
+ `n` to the end of the string.
599
+ - If `n` is negative, then it is evaluated as `length(str - n)`.
600
+ - If `n` is greater than the length of `str`, then sliceToEnd returns the empty string.
601
+
602
+ See [`String.slice`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/slice) on MDN.
603
+
604
+ ```res example
605
+ Js.String2.sliceToEnd("abcdefg", ~from=4) == "efg"
606
+ Js.String2.sliceToEnd("abcdefg", ~from=-2) == "fg"
607
+ Js.String2.sliceToEnd("abcdefg", ~from=7) == ""
608
+ ```
609
+ *)
610
+
611
+ external split : t -> t -> t array = "split"
612
+ [@@bs.send]
613
+ (**
614
+ `split(str, delimiter)` splits the given `str` at every occurrence of
615
+ `delimiter` and returns an array of the resulting substrings.
616
+
617
+ See [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)
618
+ on MDN.
619
+
620
+ ```res example
621
+ Js.String2.split("2018-01-02", "-") == ["2018", "01", "02"]
622
+ Js.String2.split("a,b,,c", ",") == ["a", "b", "", "c"]
623
+ Js.String2.split("good::bad as great::awful", "::") == ["good", "bad as great", "awful"]
624
+ Js.String2.split("has-no-delimiter", ";") == ["has-no-delimiter"]
625
+ ```
626
+ *)
627
+
628
+ external splitAtMost : t -> t -> limit:int -> t array = "split"
629
+ [@@bs.send]
630
+ (**
631
+ `splitAtMost delimiter ~limit: n str` splits the given `str` at every occurrence of `delimiter` and returns an array of the first `n` resulting substrings. If `n` is negative or greater than the number of substrings, the array will contain all the substrings.
632
+
633
+ ```
634
+ splitAtMost "ant/bee/cat/dog/elk" "/" ~limit: 3 = [|"ant"; "bee"; "cat"|];;
635
+ splitAtMost "ant/bee/cat/dog/elk" "/" ~limit: 0 = [| |];;
636
+ splitAtMost "ant/bee/cat/dog/elk" "/" ~limit: 9 = [|"ant"; "bee"; "cat"; "dog"; "elk"|];;
637
+ ```
638
+ *)
639
+
640
+ external splitByRe : t -> Js_re.t -> t option array = "split"
641
+ [@@bs.send]
642
+ (**
643
+ `splitByRe(str, regex)` splits the given `str` at every occurrence of `regex`
644
+ and returns an array of the resulting substrings.
645
+
646
+ See [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)
647
+ on MDN.
648
+
649
+ ```res example
650
+ Js.String2.splitByRe("art; bed , cog ;dad", %re("/\s*[,;]\s*/")) == [
651
+ Some("art"),
652
+ Some("bed"),
653
+ Some("cog"),
654
+ Some("dad"),
655
+ ]
656
+ ```
657
+ *)
658
+
659
+ external splitByReAtMost : t -> Js_re.t -> limit:int -> t option array = "split"
660
+ [@@bs.send]
661
+ (**
662
+ `splitByReAtMost(str, regex, ~limit:n)` splits the given `str` at every
663
+ occurrence of `regex` and returns an array of the first `n` resulting
664
+ substrings. If `n` is negative or greater than the number of substrings, the
665
+ array will contain all the substrings.
666
+
667
+ See [`String.split`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split)
668
+ on MDN.
669
+
670
+ ```res example
671
+ Js.String2.splitByReAtMost("one: two: three: four", %re("/\s*:\s*/"), ~limit=3) == [
672
+ Some("one"),
673
+ Some("two"),
674
+ Some("three"),
675
+ ]
676
+
677
+ Js.String2.splitByReAtMost("one: two: three: four", %re("/\s*:\s*/"), ~limit=0) == []
678
+
679
+ Js.String2.splitByReAtMost("one: two: three: four", %re("/\s*:\s*/"), ~limit=8) == [
680
+ Some("one"),
681
+ Some("two"),
682
+ Some("three"),
683
+ Some("four"),
684
+ ]
685
+ ```
686
+ *)
687
+
688
+ external startsWith : t -> t -> bool = "startsWith"
689
+ [@@bs.send]
690
+ (**
691
+ ES2015: `startsWith(str, substr)` returns `true` if the `str` starts with
692
+ `substr`, `false` otherwise.
693
+
694
+ See [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)
695
+ on MDN.
696
+
697
+ ```res example
698
+ Js.String2.startsWith("BuckleScript", "Buckle") == true
699
+ Js.String2.startsWith("BuckleScript", "") == true
700
+ Js.String2.startsWith("JavaScript", "Buckle") == false
701
+ ```
702
+ *)
703
+
704
+ external startsWithFrom : t -> t -> int -> bool = "startsWith"
705
+ [@@bs.send]
706
+ (**
707
+ ES2015: `startsWithFrom(str, substr, n)` returns `true` if the `str` starts
708
+ with `substr` starting at position `n`, false otherwise. If `n` is negative,
709
+ the search starts at the beginning of `str`.
710
+
711
+ See [`String.startsWith`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith)
712
+ on MDN.
713
+
714
+ ```res example
715
+ Js.String2.startsWithFrom("BuckleScript", "kle", 3) == true
716
+ Js.String2.startsWithFrom("BuckleScript", "", 3) == true
717
+ Js.String2.startsWithFrom("JavaScript", "Buckle", 2) == false
718
+ ```
719
+ *)
720
+
721
+ external substr : t -> from:int -> t = "substr"
722
+ [@@bs.send]
723
+ (**
724
+ `substr(str, ~from:n)` returns the substring of `str` from position `n` to the
725
+ end of the string.
726
+ - If `n` is less than zero, the starting position is the length of `str - n`.
727
+ - If `n` is greater than or equal to the length of `str`, returns the empty string.
728
+
729
+ JavaScript’s `String.substr()` is a legacy function. When possible, use
730
+ `substring()` instead.
731
+
732
+ See [`String.substr`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr)
733
+ on MDN.
734
+
735
+ ```res example
736
+ Js.String2.substr("abcdefghij", ~from=3) == "defghij"
737
+ Js.String2.substr("abcdefghij", ~from=-3) == "hij"
738
+ Js.String2.substr("abcdefghij", ~from=12) == ""
739
+ ```
740
+ *)
741
+
742
+ external substrAtMost : t -> from:int -> length:int -> t = "substr"
743
+ [@@bs.send]
744
+ (**
745
+ `substrAtMost(str, ~from: pos, ~length: n)` returns the substring of `str` of
746
+ length `n` starting at position `pos`.
747
+ - If `pos` is less than zero, the starting position is the length of `str - pos`.
748
+ - If `pos` is greater than or equal to the length of `str`, returns the empty string.
749
+ - If `n` is less than or equal to zero, returns the empty string.
750
+
751
+ JavaScript’s `String.substr()` is a legacy function. When possible, use
752
+ `substring()` instead.
753
+
754
+ See [`String.substr`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substr)
755
+ on MDN.
756
+
757
+ ```res example
758
+ Js.String2.substrAtMost("abcdefghij", ~from=3, ~length=4) == "defg"
759
+ Js.String2.substrAtMost("abcdefghij", ~from=-3, ~length=4) == "hij"
760
+ Js.String2.substrAtMost("abcdefghij", ~from=12, ~length=2) == ""
761
+ ```
762
+ *)
763
+
764
+ external substring : t -> from:int -> to_:int -> t = "substring"
765
+ [@@bs.send]
766
+ (**
767
+ `substring(str, ~from: start, ~to_: finish)` returns characters `start` up to
768
+ but not including finish from `str`.
769
+ - If `start` is less than zero, it is treated as zero.
770
+ - If `finish` is zero or negative, the empty string is returned.
771
+ - If `start` is greater than `finish`, the `start` and `finish` points are swapped.
772
+
773
+ See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.
774
+
775
+ ```res example
776
+ Js.String2.substring("playground", ~from=3, ~to_=6) == "ygr"
777
+ Js.String2.substring("playground", ~from=6, ~to_=3) == "ygr"
778
+ Js.String2.substring("playground", ~from=4, ~to_=12) == "ground"
779
+ ```
780
+ *)
781
+
782
+ external substringToEnd : t -> from:int -> t = "substring"
783
+ [@@bs.send]
784
+ (**
785
+ `substringToEnd(str, ~from: start)` returns the substring of `str` from
786
+ position `start` to the end.
787
+ - If `start` is less than or equal to zero, the entire string is returned.
788
+ - If `start` is greater than or equal to the length of `str`, the empty string is returned.
789
+
790
+ See [`String.substring`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring) on MDN.
791
+
792
+ ```res example
793
+ Js.String2.substringToEnd("playground", ~from=4) == "ground"
794
+ Js.String2.substringToEnd("playground", ~from=-3) == "playground"
795
+ Js.String2.substringToEnd("playground", ~from=12) == ""
796
+ ```
797
+ *)
798
+
799
+ external toLowerCase : t -> t = "toLowerCase"
800
+ [@@bs.send]
801
+ (**
802
+ `toLowerCase(str)` converts `str` to lower case using the locale-insensitive
803
+ case mappings in the Unicode Character Database. Notice that the conversion can
804
+ give different results depending upon context, for example with the Greek
805
+ letter sigma, which has two different lower case forms; one when it is the last
806
+ character in a string and another when it is not.
807
+
808
+ See [`String.toLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLowerCase)
809
+ on MDN.
810
+
811
+ ```res example
812
+ Js.String2.toLowerCase("ABC") == "abc"
813
+ Js.String2.toLowerCase(`ΣΠ`) == `σπ`
814
+ Js.String2.toLowerCase(`ΠΣ`) == `πς`
815
+ ```
816
+ *)
817
+
818
+ external toLocaleLowerCase : t -> t = "toLocaleLowerCase"
819
+ [@@bs.send]
820
+ (**
821
+ `toLocaleLowerCase(str)` converts `str` to lower case using the current locale.
822
+ See [`String.toLocaleLowerCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleLowerCase)
823
+ on MDN.
824
+ *)
825
+
826
+ external toUpperCase : t -> t = "toUpperCase"
827
+ [@@bs.send]
828
+ (**
829
+ `toUpperCase(str)` converts `str` to upper case using the locale-insensitive
830
+ case mappings in the Unicode Character Database. Notice that the conversion can
831
+ expand the number of letters in the result; for example the German ß
832
+ capitalizes to two Ses in a row.
833
+
834
+ See [`String.toUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase)
835
+ on MDN.
836
+
837
+ ```res example
838
+ Js.String2.toUpperCase("abc") == "ABC"
839
+ Js.String2.toUpperCase(`Straße`) == `STRASSE`
840
+ Js.String2.toUpperCase(`πς`) == `ΠΣ`
841
+ ```
842
+ *)
843
+
844
+ external toLocaleUpperCase : t -> t = "toLocaleUpperCase"
845
+ [@@bs.send]
846
+ (**
847
+ `toLocaleUpperCase(str)` converts `str` to upper case using the current locale.
848
+ See [`String.to:LocaleUpperCase`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toLocaleUpperCase)
849
+ on MDN.
850
+ *)
851
+
852
+ external trim : t -> t = "trim"
853
+ [@@bs.send]
854
+ (**
855
+ `trim(str)` returns a string that is `str` with whitespace stripped from both
856
+ ends. Internal whitespace is not removed.
857
+
858
+ See [`String.trim`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim)
859
+ on MDN.
860
+
861
+ ```res example
862
+ Js.String2.trim(" abc def ") == "abc def"
863
+ Js.String2.trim("\n\r\t abc def \n\n\t\r ") == "abc def"
864
+ ```
865
+ *)
866
+
867
+ (* HTML wrappers *)
868
+
869
+ external anchor : t -> t -> t = "anchor"
870
+ [@@bs.send]
871
+ (**
872
+ `anchor(anchorText, anchorName)` creates a string with an HTML `<a>` element
873
+ with name attribute of `anchorName` and `anchorText` as its content. Please do
874
+ not use this method, as it has been removed from the relevant web standards.
875
+
876
+ See [`String.anchor`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/anchor)
877
+ on MDN.
878
+
879
+ ```res example
880
+ Js.String2.anchor("Page One", "page1") == "<a name=\"page1\">Page One</a>"
881
+ ```
882
+ *)
883
+
884
+ external link : t -> t -> t = "link"
885
+ [@@bs.send]
886
+ (**
887
+ ES2015: `link(linkText, urlText)` creates a string with an HTML `<a>` element
888
+ with href attribute of `urlText` and `linkText` as its content. Please do not
889
+ use this method, as it has been removed from the relevant web standards. See
890
+ [`String.link`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/link)
891
+ on MDN.
892
+
893
+ ```res example
894
+ Js.String2.link("Go to page two", "page2.html") == "<a href=\"page2.html\">Go to page two</a>"
895
+ ```
896
+ *)
897
+
898
+ (* FIXME: we should not encourage people to use [%identity], better
899
+ to provide something using [@@bs.val] so that we can track such
900
+ casting
901
+ *)
902
+ external castToArrayLike : t -> t Js_array2.array_like = "%identity"
903
+ (**
904
+ Casts its argument to an `array_like` entity that can be processed by functions
905
+ such as `Js.Array2.fromMap()`
906
+
907
+ ```res example
908
+ let s = "abcde"
909
+ let arr = Js.Array2.fromMap(Js.String2.castToArrayLike(s), x => x)
910
+ arr == ["a", "b", "c", "d", "e"]
911
+ ```
912
+ *)