forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs_array.js
221 lines (177 loc) · 4.66 KB
/
js_array.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
'use strict';
var Curry = require("./curry.js");
var Caml_option = require("./caml_option.js");
var Caml_splice_call = require("./caml_splice_call.js");
function copyWithin(to_, obj) {
return obj.copyWithin(to_);
}
function copyWithinFrom(to_, from, obj) {
return obj.copyWithin(to_, from);
}
function copyWithinFromRange(to_, start, end_, obj) {
return obj.copyWithin(to_, start, end_);
}
function fillInPlace(arg1, obj) {
return obj.fill(arg1);
}
function fillFromInPlace(arg1, from, obj) {
return obj.fill(arg1, from);
}
function fillRangeInPlace(arg1, start, end_, obj) {
return obj.fill(arg1, start, end_);
}
function push(arg1, obj) {
return obj.push(arg1);
}
function pushMany(arg1, obj) {
return Caml_splice_call.spliceObjApply(obj, "push", [arg1]);
}
function sortInPlaceWith(arg1, obj) {
return obj.sort(Curry.__2(arg1));
}
function spliceInPlace(pos, remove, add, obj) {
return Caml_splice_call.spliceObjApply(obj, "splice", [
pos,
remove,
add
]);
}
function removeFromInPlace(pos, obj) {
return obj.splice(pos);
}
function removeCountInPlace(pos, count, obj) {
return obj.splice(pos, count);
}
function unshift(arg1, obj) {
return obj.unshift(arg1);
}
function unshiftMany(arg1, obj) {
return Caml_splice_call.spliceObjApply(obj, "unshift", [arg1]);
}
function concat(arg1, obj) {
return obj.concat(arg1);
}
function concatMany(arg1, obj) {
return Caml_splice_call.spliceObjApply(obj, "concat", [arg1]);
}
function includes(arg1, obj) {
return obj.includes(arg1);
}
function indexOf(arg1, obj) {
return obj.indexOf(arg1);
}
function indexOfFrom(arg1, from, obj) {
return obj.indexOf(arg1, from);
}
function joinWith(arg1, obj) {
return obj.join(arg1);
}
function lastIndexOf(arg1, obj) {
return obj.lastIndexOf(arg1);
}
function lastIndexOfFrom(arg1, from, obj) {
return obj.lastIndexOf(arg1, from);
}
function slice(start, end_, obj) {
return obj.slice(start, end_);
}
function sliceFrom(arg1, obj) {
return obj.slice(arg1);
}
function every(arg1, obj) {
return obj.every(Curry.__1(arg1));
}
function everyi(arg1, obj) {
return obj.every(Curry.__2(arg1));
}
function filter(arg1, obj) {
return obj.filter(Curry.__1(arg1));
}
function filteri(arg1, obj) {
return obj.filter(Curry.__2(arg1));
}
function find(arg1, obj) {
return Caml_option.undefined_to_opt(obj.find(Curry.__1(arg1)));
}
function findi(arg1, obj) {
return Caml_option.undefined_to_opt(obj.find(Curry.__2(arg1)));
}
function findIndex(arg1, obj) {
return obj.findIndex(Curry.__1(arg1));
}
function findIndexi(arg1, obj) {
return obj.findIndex(Curry.__2(arg1));
}
function forEach(arg1, obj) {
obj.forEach(Curry.__1(arg1));
}
function forEachi(arg1, obj) {
obj.forEach(Curry.__2(arg1));
}
function map(arg1, obj) {
return obj.map(Curry.__1(arg1));
}
function mapi(arg1, obj) {
return obj.map(Curry.__2(arg1));
}
function reduce(arg1, arg2, obj) {
return obj.reduce(Curry.__2(arg1), arg2);
}
function reducei(arg1, arg2, obj) {
return obj.reduce(Curry.__3(arg1), arg2);
}
function reduceRight(arg1, arg2, obj) {
return obj.reduceRight(Curry.__2(arg1), arg2);
}
function reduceRighti(arg1, arg2, obj) {
return obj.reduceRight(Curry.__3(arg1), arg2);
}
function some(arg1, obj) {
return obj.some(Curry.__1(arg1));
}
function somei(arg1, obj) {
return obj.some(Curry.__2(arg1));
}
exports.copyWithin = copyWithin;
exports.copyWithinFrom = copyWithinFrom;
exports.copyWithinFromRange = copyWithinFromRange;
exports.fillInPlace = fillInPlace;
exports.fillFromInPlace = fillFromInPlace;
exports.fillRangeInPlace = fillRangeInPlace;
exports.push = push;
exports.pushMany = pushMany;
exports.sortInPlaceWith = sortInPlaceWith;
exports.spliceInPlace = spliceInPlace;
exports.removeFromInPlace = removeFromInPlace;
exports.removeCountInPlace = removeCountInPlace;
exports.unshift = unshift;
exports.unshiftMany = unshiftMany;
exports.concat = concat;
exports.concatMany = concatMany;
exports.includes = includes;
exports.indexOf = indexOf;
exports.indexOfFrom = indexOfFrom;
exports.joinWith = joinWith;
exports.lastIndexOf = lastIndexOf;
exports.lastIndexOfFrom = lastIndexOfFrom;
exports.slice = slice;
exports.sliceFrom = sliceFrom;
exports.every = every;
exports.everyi = everyi;
exports.filter = filter;
exports.filteri = filteri;
exports.find = find;
exports.findi = findi;
exports.findIndex = findIndex;
exports.findIndexi = findIndexi;
exports.forEach = forEach;
exports.forEachi = forEachi;
exports.map = map;
exports.mapi = mapi;
exports.reduce = reduce;
exports.reducei = reducei;
exports.reduceRight = reduceRight;
exports.reduceRighti = reduceRighti;
exports.some = some;
exports.somei = somei;
/* No side effect */