File tree Expand file tree Collapse file tree 8 files changed +29
-34
lines changed
Expand file tree Collapse file tree 8 files changed +29
-34
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ FILE=bin/reason.byte
88ocamlbuild -lflags -no-check-prims -use-ocamlfind -I bin -no-hygiene -pkgs compiler-libs.common -no-links $FILE
99
1010# jsoo_mkcmis stdlib
11- js_of_ocaml -I +compiler-libs --toplevel +weak.js +toplevel.js ./polyfill.js _build/$FILE -I ./runtime/ --file js.cmi:/cmis/js.cmi --file js_unsafe.cmi:/cmis/js_unsafe.cmi --file js_re.cmi:/cmis/js_re.cmi -o _build/exports.js
11+ js_of_ocaml -I +compiler-libs --toplevel +weak.js +toplevel.js ./polyfill.js _build/$FILE -I ./others/ -I ./ runtime/ --file js.cmi:/cmis/js.cmi --file js_unsafe.cmi:/cmis/js_unsafe.cmi --file js_re.cmi:/cmis/js_re.cmi -o _build/exports.js
1212
1313DOCS_DIR=../docs/js-demo
1414
Original file line number Diff line number Diff line change @@ -10,11 +10,10 @@ bs_node_module.cmj : bs_node.cmj bs_dict.cmj
1010bs_node_module.cmx : bs_node.cmx bs_dict.cmx
1111js_array.cmj :
1212js_array.cmx :
13- js_string.cmj : bs.cmj js_string.cmi
14- js_string.cmx : bs.cmx js_string.cmi
13+ js_string.cmj : bs.cmj
14+ js_string.cmx : bs.cmx
1515js_re.cmj : js_re.cmi
1616js_re.cmx : js_re.cmi
17- js_string.cmi :
1817js_re.cmi :
1918bs_node_path.cmo :
2019bs_node_path.cmj :
@@ -28,7 +27,7 @@ bs_node_module.cmo : bs_node.cmo bs_dict.cmo
2827bs_node_module.cmj : bs_node.cmj bs_dict.cmj
2928js_array.cmo :
3029js_array.cmj :
31- js_string.cmo : bs.cmo js_string.cmi
32- js_string.cmj : bs.cmj js_string.cmi
30+ js_string.cmo : bs.cmo
31+ js_string.cmj : bs.cmj
3332js_re.cmo : js_re.cmi
3433js_re.cmj : js_re.cmi
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ external charAt : int -> t = "" [@@bs.send.pipe: t]
5151
5252external charCodeAt : int -> float = " " [@@ bs.send.pipe: t ]
5353(* * type it as [float] due to that it may return NAN *)
54- external concat : t -> t = " " [@@ bs.send.pipe: t ]
54+ external concat : t -> t = " " [@@ bs.send.pipe: t ]
5555
5656external indexOf : t -> int = " " [@@ bs.send.pipe: t ]
5757external indexOf_from : t -> int -> int = " indexOf" [@@ bs.send.pipe: t ]
@@ -70,8 +70,9 @@ external slice_end : int -> t = "slice" [@@bs.send.pipe: t]
7070
7171external split : t -> t array = " " [@@ bs.send.pipe: t ]
7272external split_limited : t -> int -> t array = " split" [@@ bs.send.pipe: t ]
73- external split_regExp : Bs.Re .t -> t array = " split" [@@ bs.send.pipe: t ]
73+ external split_by_reg : Bs.Re .t -> t array = " split" [@@ bs.send.pipe: t ]
7474external split_regExpLimited : Bs.Re .t -> int -> t array = " " [@@ bs.send.pipe: t ]
75+
7576external substring : int -> int -> t = " " [@@ bs.send.pipe: t ]
7677external substring_toEnd : int -> t = " substring" [@@ bs.send.pipe: t ]
7778external toLowerCase : t = " " [@@ bs.send.pipe: t ]
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -87,6 +87,8 @@ bs_array_test.cmj : ../runtime/js.cmj ../others/bs.cmj
8787bs_array_test.cmx : ../runtime/js.cmx ../others/bs.cmx
8888bs_rest_test.cmj :
8989bs_rest_test.cmx :
90+ bs_string_test.cmj : ../runtime/js.cmj ../others/bs.cmj
91+ bs_string_test.cmx : ../runtime/js.cmx ../others/bs.cmx
9092buffer_test.cmj : ../stdlib/string.cmi mt.cmi ../stdlib/bytes.cmi \
9193 ../stdlib/buffer.cmi
9294buffer_test.cmx : ../stdlib/string.cmx mt.cmx ../stdlib/bytes.cmx \
@@ -869,6 +871,8 @@ bs_array_test.cmo : ../runtime/js.cmo ../others/bs.cmo
869871bs_array_test.cmj : ../runtime/js.cmj ../others/bs.cmj
870872bs_rest_test.cmo :
871873bs_rest_test.cmj :
874+ bs_string_test.cmo : ../runtime/js.cmo ../others/bs.cmo
875+ bs_string_test.cmj : ../runtime/js.cmj ../others/bs.cmj
872876buffer_test.cmo : ../stdlib/string.cmi mt.cmi ../stdlib/bytes.cmi \
873877 ../stdlib/buffer.cmi
874878buffer_test.cmj : ../stdlib/string.cmj mt.cmj ../stdlib/bytes.cmj \
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ OTHERS := literals a test_ari test_export2 test_internalOO test_obj_simple_ffi t
6161 test_case_set test_mutliple string_bound_get_test inline_string_test\
6262 ppx_this_obj_test unsafe_obj_external gpr_627_test jsoo_485_test jsoo_400_test \
6363 test_require more_uncurry earger_curry_test poly_type bench mutable_obj_test\
64- gpr_658 module_as_class_ffi pipe_send_readline demo_pipe bs_array_test
64+ gpr_658 module_as_class_ffi pipe_send_readline demo_pipe bs_array_test bs_string_test
6565
6666
6767
Original file line number Diff line number Diff line change 1+ 'use strict' ;
2+
3+
4+ console . log ( "ghso ghso g" . split ( " " ) . reduce ( function ( x , y ) {
5+ return x + ( "-" + y ) ;
6+ } , "" ) ) ;
7+
8+ /* Not a pure module */
Original file line number Diff line number Diff line change 1+
2+
3+ let () =
4+ " ghso ghso g"
5+ |> Bs.String. split " "
6+ |> Bs.Array. reduce (fun [@bs ] x y -> x ^ " -" ^ y) " "
7+ |> Js. log
8+
You can’t perform that action at this time.
0 commit comments