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
8
8
ocamlbuild -lflags -no-check-prims -use-ocamlfind -I bin -no-hygiene -pkgs compiler-libs.common -no-links $FILE
9
9
10
10
# 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
12
12
13
13
DOCS_DIR=../docs/js-demo
14
14
Original file line number Diff line number Diff line change @@ -10,11 +10,10 @@ bs_node_module.cmj : bs_node.cmj bs_dict.cmj
10
10
bs_node_module.cmx : bs_node.cmx bs_dict.cmx
11
11
js_array.cmj :
12
12
js_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
15
15
js_re.cmj : js_re.cmi
16
16
js_re.cmx : js_re.cmi
17
- js_string.cmi :
18
17
js_re.cmi :
19
18
bs_node_path.cmo :
20
19
bs_node_path.cmj :
@@ -28,7 +27,7 @@ bs_node_module.cmo : bs_node.cmo bs_dict.cmo
28
27
bs_node_module.cmj : bs_node.cmj bs_dict.cmj
29
28
js_array.cmo :
30
29
js_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
33
32
js_re.cmo : js_re.cmi
34
33
js_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]
51
51
52
52
external charCodeAt : int -> float = " " [@@ bs.send.pipe: t ]
53
53
(* * 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 ]
55
55
56
56
external indexOf : t -> int = " " [@@ bs.send.pipe: t ]
57
57
external indexOf_from : t -> int -> int = " indexOf" [@@ bs.send.pipe: t ]
@@ -70,8 +70,9 @@ external slice_end : int -> t = "slice" [@@bs.send.pipe: t]
70
70
71
71
external split : t -> t array = " " [@@ bs.send.pipe: t ]
72
72
external 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 ]
74
74
external split_regExpLimited : Bs.Re .t -> int -> t array = " " [@@ bs.send.pipe: t ]
75
+
75
76
external substring : int -> int -> t = " " [@@ bs.send.pipe: t ]
76
77
external substring_toEnd : int -> t = " substring" [@@ bs.send.pipe: t ]
77
78
external 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
87
87
bs_array_test.cmx : ../runtime/js.cmx ../others/bs.cmx
88
88
bs_rest_test.cmj :
89
89
bs_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
90
92
buffer_test.cmj : ../stdlib/string.cmi mt.cmi ../stdlib/bytes.cmi \
91
93
../stdlib/buffer.cmi
92
94
buffer_test.cmx : ../stdlib/string.cmx mt.cmx ../stdlib/bytes.cmx \
@@ -869,6 +871,8 @@ bs_array_test.cmo : ../runtime/js.cmo ../others/bs.cmo
869
871
bs_array_test.cmj : ../runtime/js.cmj ../others/bs.cmj
870
872
bs_rest_test.cmo :
871
873
bs_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
872
876
buffer_test.cmo : ../stdlib/string.cmi mt.cmi ../stdlib/bytes.cmi \
873
877
../stdlib/buffer.cmi
874
878
buffer_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
61
61
test_case_set test_mutliple string_bound_get_test inline_string_test\
62
62
ppx_this_obj_test unsafe_obj_external gpr_627_test jsoo_485_test jsoo_400_test \
63
63
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
65
65
66
66
67
67
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