envio 2.7.5 → 2.8.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.
- package/package.json +7 -8
- package/src/Utils.res +17 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "envio",
|
|
3
|
-
"version": "v2.
|
|
3
|
+
"version": "v2.8.1",
|
|
4
4
|
"description": "A latency and sync speed optimized, developer friendly blockchain data indexer.",
|
|
5
5
|
"bin": "./bin.js",
|
|
6
6
|
"repository": {
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://envio.dev",
|
|
25
25
|
"optionalDependencies": {
|
|
26
|
-
"envio-linux-x64": "v2.
|
|
27
|
-
"envio-linux-arm64": "v2.
|
|
28
|
-
"envio-darwin-x64": "v2.
|
|
29
|
-
"envio-darwin-arm64": "v2.
|
|
26
|
+
"envio-linux-x64": "v2.8.1",
|
|
27
|
+
"envio-linux-arm64": "v2.8.1",
|
|
28
|
+
"envio-darwin-x64": "v2.8.1",
|
|
29
|
+
"envio-darwin-arm64": "v2.8.1"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@envio-dev/hypersync-client": "0.6.2",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"evm.schema.json",
|
|
40
40
|
"fuel.schema.json",
|
|
41
41
|
"rescript.json",
|
|
42
|
-
"src
|
|
43
|
-
"src/**/*.
|
|
44
|
-
"src/**/*.ts"
|
|
42
|
+
"src",
|
|
43
|
+
"!src/**/*.bs.js"
|
|
45
44
|
]
|
|
46
45
|
}
|
package/src/Utils.res
CHANGED
|
@@ -154,7 +154,7 @@ Helper to check if a value exists in an array
|
|
|
154
154
|
} else {
|
|
155
155
|
let head = array->Js.Array2.slice(~start=0, ~end_=index)
|
|
156
156
|
let tail = array->Belt.Array.sliceToEnd(index + 1)
|
|
157
|
-
|
|
157
|
+
Belt.Array.concat(head, tail)
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -182,6 +182,22 @@ Helper to check if a value exists in an array
|
|
|
182
182
|
*/
|
|
183
183
|
@send
|
|
184
184
|
external spliceInPlace: (array<'a>, ~pos: int, ~remove: int) => array<'a> = "splice"
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
Interleaves an array with a separator
|
|
188
|
+
|
|
189
|
+
interleave([1, 2, 3], 0) -> [1, 0, 2, 0, 3]
|
|
190
|
+
*/
|
|
191
|
+
let interleave = (arr: array<'a>, separator: 'a) => {
|
|
192
|
+
let interleaved = []
|
|
193
|
+
arr->Js.Array2.forEachi((v, i) => {
|
|
194
|
+
interleaved->Js.Array2.push(v)->ignore
|
|
195
|
+
if i < arr->Array.length - 1 {
|
|
196
|
+
interleaved->Js.Array2.push(separator)->ignore
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
interleaved
|
|
200
|
+
}
|
|
185
201
|
}
|
|
186
202
|
|
|
187
203
|
module String = {
|