@@ -33,10 +33,34 @@ rewrite="Array.sliceToEnd(~start=:[from])"
33
33
match =" Js.Array2.slice(~start=:[from], ~end_=:[to])"
34
34
rewrite =" Array.slice(~start=:[from], ~end=:[to])"
35
35
36
+ [array-filteri ]
37
+ match =" Js.Array2.filteri"
38
+ rewrite =" Array.filterWithIndex"
39
+
40
+ [array-findi ]
41
+ match =" Js.Array2.findi"
42
+ rewrite =" Array.findWithIndex"
43
+
44
+ [array-mapi ]
45
+ match =" Js.Array2.mapi"
46
+ rewrite =" Array.mapWithIndex"
47
+
48
+ [array-forEachi ]
49
+ match =" Js.Array2.forEachi"
50
+ rewrite =" Array.forEachWithIndex"
51
+
52
+ [array-splice ]
53
+ match =" Js.Array2.spliceInPlace(~pos=:[pos], ~remove=:[remove], ~add=:[add])->ignore"
54
+ rewrite =" Js.Array2.splice(~start=:[pos], ~remove=:[remove], ~insert=:[add])"
55
+
36
56
[array-z ]
37
57
match =" Js.Array2"
38
58
rewrite =" Array"
39
59
60
+ [js-option ]
61
+ match =" Js.Option"
62
+ rewrite =" Option"
63
+
40
64
[string-a-slice ]
41
65
match =" Js.String2.slice(~from=:[from], ~to_=:[to])"
42
66
rewrite =" String.slice(~start=:[from], ~end=:[to])"
@@ -49,6 +73,18 @@ rewrite="String.sliceToEnd(~start=:[from])"
49
73
match =" Js.String2.replace"
50
74
rewrite =" String.replaceString"
51
75
76
+ [string-a-substring ]
77
+ match =" Js.String2.substring(~from=:[from], ~to_=:[to])"
78
+ rewrite =" String.substring(~start=:[from], ~end=:[to])"
79
+
80
+ [string-a-substringToEnd ]
81
+ match =" Js.String2.substringToEnd(~from=:[from])"
82
+ rewrite =" String.substringToEnd(~start=:[from])"
83
+
84
+ [string-replaceStringByRe ]
85
+ match =" Js.String2.replaceStringByRe"
86
+ rewrite =" String.replaceRegExp"
87
+
52
88
[string-z ]
53
89
match =" Js.String2"
54
90
rewrite =" String"
@@ -89,10 +125,30 @@ rewrite="Dict"
89
125
match =" Js.Dict.t"
90
126
rewrite =" Dict.t"
91
127
128
+ [js-null-make ]
129
+ match =" Js.Null.return"
130
+ rewrite =" Null.make"
131
+
132
+ [js-null-z ]
133
+ match =" Js.Null"
134
+ rewrite =" Null"
135
+
136
+ [js-nullable-make ]
137
+ match =" Js.Nullable.return"
138
+ rewrite =" Nullable.make"
139
+
92
140
[js-nullable-z ]
93
141
match =" Js.Nullable"
94
142
rewrite =" Nullable"
95
143
144
+ [js-null-undefined-make ]
145
+ match =" Js.Null_undefined.return"
146
+ rewrite =" Nullable.make"
147
+
148
+ [js-null-undefined-z ]
149
+ match =" Js.Null_undefined"
150
+ rewrite =" Nullable"
151
+
96
152
[js-log-z ]
97
153
match =" Js.log"
98
154
rewrite =" Console.log"
@@ -109,6 +165,94 @@ rewrite="RegExp.test"
109
165
match =" Js.Json.t"
110
166
rewrite =" JSON.t"
111
167
168
+ [json-stringify ]
169
+ match =" Js.Json.stringify"
170
+ rewrite =" JSON.stringify"
171
+
172
+ [json-enc-null ]
173
+ match =" Js.Json.null"
174
+ rewrite =" JSON.Encode.null"
175
+
176
+ [json-enc-object ]
177
+ match =" Js.Json.object_"
178
+ rewrite =" JSON.Encode.object"
179
+
180
+ [json-enc-string ]
181
+ match =" Js.Json.string"
182
+ rewrite =" JSON.Encode.string"
183
+
184
+ [json-enc-bool ]
185
+ match =" Js.Json.boolean"
186
+ rewrite =" JSON.Encode.bool"
187
+
188
+ [json-enc-int ]
189
+ match =" Js.Json.int"
190
+ rewrite =" JSON.Encode.int"
191
+
192
+ [json-enc-float ]
193
+ match =" Js.Json.number"
194
+ rewrite =" JSON.Encode.float"
195
+
196
+ [json-enc-array ]
197
+ match =" Js.Json.array"
198
+ rewrite =" JSON.Encode.array"
199
+
200
+ [json-dec-bool ]
201
+ match =" Js.Json.decodeBoolean"
202
+ rewrite =" JSON.Decode.bool"
203
+
204
+ [json-dec-null ]
205
+ match =" Js.Json.decodeNull"
206
+ rewrite =" JSON.Decode.null"
207
+
208
+ [json-dec-string ]
209
+ match =" Js.Json.decodeString"
210
+ rewrite =" JSON.Decode.string"
211
+
212
+ [json-dec-float ]
213
+ match =" Js.Json.decodeNumber"
214
+ rewrite =" JSON.Decode.float"
215
+
216
+ [json-dec-obj ]
217
+ match =" Js.Json.decodeObject"
218
+ rewrite =" JSON.Decode.object"
219
+
220
+ [json-dec-array ]
221
+ match =" Js.Json.decodeArray"
222
+ rewrite =" JSON.Decode.array"
223
+
224
+ [json-classify ]
225
+ match =" Js.Json.classify"
226
+ rewrite =" JSON.Classify.classify"
227
+
228
+ [json-classify-False ]
229
+ match =" JSONFalse"
230
+ rewrite =" Bool(false)"
231
+
232
+ [json-classify-True ]
233
+ match =" JSONTrue"
234
+ rewrite =" Bool(true)"
235
+
236
+ [json-classify-Null ]
237
+ match =" JSONNull"
238
+ rewrite =" Null"
239
+
240
+ [json-classify-String ]
241
+ match =" JSONString(:[string])"
242
+ rewrite =" String(:[string])"
243
+
244
+ [json-classify-Number ]
245
+ match =" JSONNumber(:[float])"
246
+ rewrite =" Number(:[float])"
247
+
248
+ [json-classify-Object ]
249
+ match =" JSONObject(:[dict])"
250
+ rewrite =" Object(:[dict])"
251
+
252
+ [json-classify-Array ]
253
+ match =" JSONArray(:[array])"
254
+ rewrite =" Array(:[array])"
255
+
112
256
[json-t-rest ]
113
257
match =" Js.Json"
114
258
rewrite =" JSON"
@@ -275,3 +419,4 @@ rewrite="Date"
275
419
[js-global-a ]
276
420
match =" Js.Global."
277
421
rewrite =" "
422
+
0 commit comments