rapid-fuzzy 2.1.0 → 2.1.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/README.md +4 -4
- package/highlight.d.ts +1 -1
- package/index.d.ts +2 -1
- package/index.js +215 -103
- package/package.json +19 -37
- package/rapid-fuzzy-wasm-bindgen.d.ts +14 -14
- package/rapid-fuzzy-wasm-bindgen_bg.js +68 -68
- package/rapid-fuzzy-wasm-bindgen_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -197,7 +197,7 @@ search('app', items, { maxResults: 5, minScore: 0.3 });
|
|
|
197
197
|
|
|
198
198
|
// Get matched character positions for highlighting
|
|
199
199
|
const [match] = search('hlo', ['hello world'], { includePositions: true });
|
|
200
|
-
// → { item: 'hello world', score: 0.
|
|
200
|
+
// → { item: 'hello world', score: 0.77, index: 0, positions: [0, 3, 4] }
|
|
201
201
|
|
|
202
202
|
// Case-sensitive matching (default: smart case)
|
|
203
203
|
search('Type', items, { isCaseSensitive: true });
|
|
@@ -370,7 +370,7 @@ const { item, positions } = results[0];
|
|
|
370
370
|
|
|
371
371
|
// String markers
|
|
372
372
|
highlight(item, positions, '<b>', '</b>');
|
|
373
|
-
// → '<b>f</b>
|
|
373
|
+
// → '<b>f</b>uz<b>zy</b>'
|
|
374
374
|
|
|
375
375
|
// Callback (React, JSX, custom DOM)
|
|
376
376
|
highlight(item, positions, (matched) => `<mark>${matched}</mark>`);
|
|
@@ -397,13 +397,13 @@ import {
|
|
|
397
397
|
tokenSortRatio('New York Mets', 'Mets New York'); // 1.0
|
|
398
398
|
|
|
399
399
|
// Token Set: handles extra/missing tokens
|
|
400
|
-
tokenSetRatio('Great Gatsby', 'The Great Gatsby by Fitzgerald'); //
|
|
400
|
+
tokenSetRatio('Great Gatsby', 'The Great Gatsby by Fitzgerald'); // 1.0 (all tokens of one side are present)
|
|
401
401
|
|
|
402
402
|
// Partial: best substring match
|
|
403
403
|
partialRatio('hello', 'hello world'); // 1.0
|
|
404
404
|
|
|
405
405
|
// Weighted: best score across all methods
|
|
406
|
-
weightedRatio('John Smith', 'Smith
|
|
406
|
+
weightedRatio('John Smith', 'Smith John'); // 1.0
|
|
407
407
|
```
|
|
408
408
|
|
|
409
409
|
All token-based functions include `Batch` and `Many` variants (e.g., `tokenSortRatioBatch`, `tokenSortRatioMany`).
|
package/highlight.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface HighlightRange {
|
|
|
17
17
|
* ```typescript
|
|
18
18
|
* const results = search('fzy', ['fuzzy'], { includePositions: true });
|
|
19
19
|
* highlight(results[0].item, results[0].positions, '<b>', '</b>');
|
|
20
|
-
* // → '<b>f</b>
|
|
20
|
+
* // → '<b>f</b>uz<b>zy</b>'
|
|
21
21
|
* ```
|
|
22
22
|
*
|
|
23
23
|
* @example Callback (React, custom DOM, etc.)
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* auto-generated by NAPI-RS */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* A persistent fuzzy search index backed by Rust-side data.
|
|
5
6
|
*
|
|
@@ -362,7 +363,7 @@ export declare const enum MatchType {
|
|
|
362
363
|
Exact = 'Exact',
|
|
363
364
|
Prefix = 'Prefix',
|
|
364
365
|
Contains = 'Contains',
|
|
365
|
-
Fuzzy = 'Fuzzy'
|
|
366
|
+
Fuzzy = 'Fuzzy',
|
|
366
367
|
}
|
|
367
368
|
|
|
368
369
|
/**
|
package/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// prettier-ignore
|
|
2
1
|
/* eslint-disable */
|
|
3
2
|
// @ts-nocheck
|
|
4
3
|
/* auto-generated by NAPI-RS */
|
|
@@ -63,7 +62,7 @@ const isMuslFromChildProcess = () => {
|
|
|
63
62
|
function requireNative() {
|
|
64
63
|
if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
|
|
65
64
|
try {
|
|
66
|
-
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
65
|
+
return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH)
|
|
67
66
|
} catch (err) {
|
|
68
67
|
loadErrors.push(err)
|
|
69
68
|
}
|
|
@@ -77,8 +76,8 @@ function requireNative() {
|
|
|
77
76
|
try {
|
|
78
77
|
const binding = require('rapid-fuzzy-android-arm64')
|
|
79
78
|
const bindingPackageVersion = require('rapid-fuzzy-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '2.1.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
79
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
80
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
81
|
}
|
|
83
82
|
return binding
|
|
84
83
|
} catch (e) {
|
|
@@ -93,8 +92,8 @@ function requireNative() {
|
|
|
93
92
|
try {
|
|
94
93
|
const binding = require('rapid-fuzzy-android-arm-eabi')
|
|
95
94
|
const bindingPackageVersion = require('rapid-fuzzy-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '2.1.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
95
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
96
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
97
|
}
|
|
99
98
|
return binding
|
|
100
99
|
} catch (e) {
|
|
@@ -107,36 +106,36 @@ function requireNative() {
|
|
|
107
106
|
if (process.arch === 'x64') {
|
|
108
107
|
if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
|
|
109
108
|
try {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
109
|
+
return require('./rapid-fuzzy.win32-x64-gnu.node')
|
|
110
|
+
} catch (e) {
|
|
111
|
+
loadErrors.push(e)
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
const binding = require('rapid-fuzzy-win32-x64-gnu')
|
|
115
|
+
const bindingPackageVersion = require('rapid-fuzzy-win32-x64-gnu/package.json').version
|
|
116
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
117
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
118
|
+
}
|
|
119
|
+
return binding
|
|
120
|
+
} catch (e) {
|
|
121
|
+
loadErrors.push(e)
|
|
119
122
|
}
|
|
120
|
-
return binding
|
|
121
|
-
} catch (e) {
|
|
122
|
-
loadErrors.push(e)
|
|
123
|
-
}
|
|
124
123
|
} else {
|
|
125
124
|
try {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
125
|
+
return require('./rapid-fuzzy.win32-x64-msvc.node')
|
|
126
|
+
} catch (e) {
|
|
127
|
+
loadErrors.push(e)
|
|
128
|
+
}
|
|
129
|
+
try {
|
|
130
|
+
const binding = require('rapid-fuzzy-win32-x64-msvc')
|
|
131
|
+
const bindingPackageVersion = require('rapid-fuzzy-win32-x64-msvc/package.json').version
|
|
132
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
133
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
134
|
+
}
|
|
135
|
+
return binding
|
|
136
|
+
} catch (e) {
|
|
137
|
+
loadErrors.push(e)
|
|
135
138
|
}
|
|
136
|
-
return binding
|
|
137
|
-
} catch (e) {
|
|
138
|
-
loadErrors.push(e)
|
|
139
|
-
}
|
|
140
139
|
}
|
|
141
140
|
} else if (process.arch === 'ia32') {
|
|
142
141
|
try {
|
|
@@ -147,8 +146,8 @@ function requireNative() {
|
|
|
147
146
|
try {
|
|
148
147
|
const binding = require('rapid-fuzzy-win32-ia32-msvc')
|
|
149
148
|
const bindingPackageVersion = require('rapid-fuzzy-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '2.1.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
149
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
150
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
151
|
}
|
|
153
152
|
return binding
|
|
154
153
|
} catch (e) {
|
|
@@ -163,8 +162,8 @@ function requireNative() {
|
|
|
163
162
|
try {
|
|
164
163
|
const binding = require('rapid-fuzzy-win32-arm64-msvc')
|
|
165
164
|
const bindingPackageVersion = require('rapid-fuzzy-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '2.1.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
165
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
166
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
167
|
}
|
|
169
168
|
return binding
|
|
170
169
|
} catch (e) {
|
|
@@ -182,8 +181,8 @@ function requireNative() {
|
|
|
182
181
|
try {
|
|
183
182
|
const binding = require('rapid-fuzzy-darwin-universal')
|
|
184
183
|
const bindingPackageVersion = require('rapid-fuzzy-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '2.1.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
184
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
185
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
186
|
}
|
|
188
187
|
return binding
|
|
189
188
|
} catch (e) {
|
|
@@ -198,8 +197,8 @@ function requireNative() {
|
|
|
198
197
|
try {
|
|
199
198
|
const binding = require('rapid-fuzzy-darwin-x64')
|
|
200
199
|
const bindingPackageVersion = require('rapid-fuzzy-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '2.1.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
200
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
201
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
202
|
}
|
|
204
203
|
return binding
|
|
205
204
|
} catch (e) {
|
|
@@ -214,8 +213,8 @@ function requireNative() {
|
|
|
214
213
|
try {
|
|
215
214
|
const binding = require('rapid-fuzzy-darwin-arm64')
|
|
216
215
|
const bindingPackageVersion = require('rapid-fuzzy-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '2.1.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
216
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
217
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
218
|
}
|
|
220
219
|
return binding
|
|
221
220
|
} catch (e) {
|
|
@@ -234,8 +233,8 @@ function requireNative() {
|
|
|
234
233
|
try {
|
|
235
234
|
const binding = require('rapid-fuzzy-freebsd-x64')
|
|
236
235
|
const bindingPackageVersion = require('rapid-fuzzy-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '2.1.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
236
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
237
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
238
|
}
|
|
240
239
|
return binding
|
|
241
240
|
} catch (e) {
|
|
@@ -250,8 +249,8 @@ function requireNative() {
|
|
|
250
249
|
try {
|
|
251
250
|
const binding = require('rapid-fuzzy-freebsd-arm64')
|
|
252
251
|
const bindingPackageVersion = require('rapid-fuzzy-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '2.1.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
252
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
253
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
254
|
}
|
|
256
255
|
return binding
|
|
257
256
|
} catch (e) {
|
|
@@ -271,8 +270,8 @@ function requireNative() {
|
|
|
271
270
|
try {
|
|
272
271
|
const binding = require('rapid-fuzzy-linux-x64-musl')
|
|
273
272
|
const bindingPackageVersion = require('rapid-fuzzy-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '2.1.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
273
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
274
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
275
|
}
|
|
277
276
|
return binding
|
|
278
277
|
} catch (e) {
|
|
@@ -287,8 +286,8 @@ function requireNative() {
|
|
|
287
286
|
try {
|
|
288
287
|
const binding = require('rapid-fuzzy-linux-x64-gnu')
|
|
289
288
|
const bindingPackageVersion = require('rapid-fuzzy-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '2.1.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
289
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
290
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
291
|
}
|
|
293
292
|
return binding
|
|
294
293
|
} catch (e) {
|
|
@@ -305,8 +304,8 @@ function requireNative() {
|
|
|
305
304
|
try {
|
|
306
305
|
const binding = require('rapid-fuzzy-linux-arm64-musl')
|
|
307
306
|
const bindingPackageVersion = require('rapid-fuzzy-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '2.1.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
307
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
308
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
309
|
}
|
|
311
310
|
return binding
|
|
312
311
|
} catch (e) {
|
|
@@ -321,8 +320,8 @@ function requireNative() {
|
|
|
321
320
|
try {
|
|
322
321
|
const binding = require('rapid-fuzzy-linux-arm64-gnu')
|
|
323
322
|
const bindingPackageVersion = require('rapid-fuzzy-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '2.1.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
323
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
324
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
325
|
}
|
|
327
326
|
return binding
|
|
328
327
|
} catch (e) {
|
|
@@ -339,8 +338,8 @@ function requireNative() {
|
|
|
339
338
|
try {
|
|
340
339
|
const binding = require('rapid-fuzzy-linux-arm-musleabihf')
|
|
341
340
|
const bindingPackageVersion = require('rapid-fuzzy-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '2.1.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
341
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
342
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
343
|
}
|
|
345
344
|
return binding
|
|
346
345
|
} catch (e) {
|
|
@@ -355,8 +354,8 @@ function requireNative() {
|
|
|
355
354
|
try {
|
|
356
355
|
const binding = require('rapid-fuzzy-linux-arm-gnueabihf')
|
|
357
356
|
const bindingPackageVersion = require('rapid-fuzzy-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '2.1.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
357
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
358
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
359
|
}
|
|
361
360
|
return binding
|
|
362
361
|
} catch (e) {
|
|
@@ -373,8 +372,8 @@ function requireNative() {
|
|
|
373
372
|
try {
|
|
374
373
|
const binding = require('rapid-fuzzy-linux-loong64-musl')
|
|
375
374
|
const bindingPackageVersion = require('rapid-fuzzy-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '2.1.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
375
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
376
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
377
|
}
|
|
379
378
|
return binding
|
|
380
379
|
} catch (e) {
|
|
@@ -389,8 +388,8 @@ function requireNative() {
|
|
|
389
388
|
try {
|
|
390
389
|
const binding = require('rapid-fuzzy-linux-loong64-gnu')
|
|
391
390
|
const bindingPackageVersion = require('rapid-fuzzy-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '2.1.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
391
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
392
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
393
|
}
|
|
395
394
|
return binding
|
|
396
395
|
} catch (e) {
|
|
@@ -407,8 +406,8 @@ function requireNative() {
|
|
|
407
406
|
try {
|
|
408
407
|
const binding = require('rapid-fuzzy-linux-riscv64-musl')
|
|
409
408
|
const bindingPackageVersion = require('rapid-fuzzy-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '2.1.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
409
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
410
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
411
|
}
|
|
413
412
|
return binding
|
|
414
413
|
} catch (e) {
|
|
@@ -423,8 +422,8 @@ function requireNative() {
|
|
|
423
422
|
try {
|
|
424
423
|
const binding = require('rapid-fuzzy-linux-riscv64-gnu')
|
|
425
424
|
const bindingPackageVersion = require('rapid-fuzzy-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '2.1.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
425
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
426
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
427
|
}
|
|
429
428
|
return binding
|
|
430
429
|
} catch (e) {
|
|
@@ -440,8 +439,8 @@ function requireNative() {
|
|
|
440
439
|
try {
|
|
441
440
|
const binding = require('rapid-fuzzy-linux-ppc64-gnu')
|
|
442
441
|
const bindingPackageVersion = require('rapid-fuzzy-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '2.1.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
442
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
443
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
444
|
}
|
|
446
445
|
return binding
|
|
447
446
|
} catch (e) {
|
|
@@ -456,8 +455,8 @@ function requireNative() {
|
|
|
456
455
|
try {
|
|
457
456
|
const binding = require('rapid-fuzzy-linux-s390x-gnu')
|
|
458
457
|
const bindingPackageVersion = require('rapid-fuzzy-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '2.1.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
458
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
459
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
460
|
}
|
|
462
461
|
return binding
|
|
463
462
|
} catch (e) {
|
|
@@ -476,8 +475,8 @@ function requireNative() {
|
|
|
476
475
|
try {
|
|
477
476
|
const binding = require('rapid-fuzzy-openharmony-arm64')
|
|
478
477
|
const bindingPackageVersion = require('rapid-fuzzy-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '2.1.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
478
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
479
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
480
|
}
|
|
482
481
|
return binding
|
|
483
482
|
} catch (e) {
|
|
@@ -492,8 +491,8 @@ function requireNative() {
|
|
|
492
491
|
try {
|
|
493
492
|
const binding = require('rapid-fuzzy-openharmony-x64')
|
|
494
493
|
const bindingPackageVersion = require('rapid-fuzzy-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '2.1.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
494
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
495
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
496
|
}
|
|
498
497
|
return binding
|
|
499
498
|
} catch (e) {
|
|
@@ -508,8 +507,8 @@ function requireNative() {
|
|
|
508
507
|
try {
|
|
509
508
|
const binding = require('rapid-fuzzy-openharmony-arm')
|
|
510
509
|
const bindingPackageVersion = require('rapid-fuzzy-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '2.1.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 2.1.
|
|
510
|
+
if (bindingPackageVersion !== '2.1.1' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
511
|
+
throw new Error(`Native binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
512
|
}
|
|
514
513
|
return binding
|
|
515
514
|
} catch (e) {
|
|
@@ -523,47 +522,163 @@ function requireNative() {
|
|
|
523
522
|
}
|
|
524
523
|
}
|
|
525
524
|
|
|
526
|
-
|
|
525
|
+
function createLoadErrorChain(errors) {
|
|
526
|
+
return errors.reduce((previous, current) => {
|
|
527
|
+
let message
|
|
528
|
+
try {
|
|
529
|
+
message =
|
|
530
|
+
current && typeof current.message === 'string'
|
|
531
|
+
? current.message
|
|
532
|
+
: String(current)
|
|
533
|
+
} catch {
|
|
534
|
+
message = 'Unknown error'
|
|
535
|
+
}
|
|
536
|
+
const error = new Error(message)
|
|
537
|
+
error.cause = previous
|
|
538
|
+
return error
|
|
539
|
+
}, null)
|
|
540
|
+
}
|
|
527
541
|
|
|
528
542
|
// NAPI_RS_FORCE_WASI is a tri-state flag:
|
|
529
543
|
// unset / any other value → native binding preferred, WASI is only a fallback
|
|
530
|
-
// 'true' →
|
|
531
|
-
// 'error' →
|
|
544
|
+
// 'true' → prefer WASI, but retain native as a lazy fallback
|
|
545
|
+
// 'error' → require WASI without initializing a native fallback
|
|
532
546
|
// Treating any non-empty string as truthy (the historical behavior) meant
|
|
533
547
|
// NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
|
|
534
548
|
// the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
|
|
549
|
+
//
|
|
550
|
+
// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
|
|
551
|
+
// WASI loading. It never crosses into another flavor or falls back to native.
|
|
552
|
+
const __napiWasiFlavors = ['wasm32-wasi']
|
|
553
|
+
const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
|
|
554
|
+
const __napiWasiFlavorRequested =
|
|
555
|
+
typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
|
|
556
|
+
if (
|
|
557
|
+
__napiWasiFlavorRequested &&
|
|
558
|
+
__napiWasiFlavors.indexOf(__napiWasiFlavor) === -1
|
|
559
|
+
) {
|
|
560
|
+
throw new Error(
|
|
561
|
+
'Unsupported WASI flavor "' +
|
|
562
|
+
__napiWasiFlavor +
|
|
563
|
+
'". Available flavors: ' +
|
|
564
|
+
__napiWasiFlavors.join(', '),
|
|
565
|
+
)
|
|
566
|
+
}
|
|
567
|
+
const forceWasiError = process.env.NAPI_RS_FORCE_WASI === 'error'
|
|
535
568
|
const forceWasi =
|
|
536
|
-
process.env.NAPI_RS_FORCE_WASI === 'true' ||
|
|
569
|
+
process.env.NAPI_RS_FORCE_WASI === 'true' ||
|
|
570
|
+
forceWasiError ||
|
|
571
|
+
__napiWasiFlavorRequested
|
|
572
|
+
|
|
573
|
+
if (!forceWasi) {
|
|
574
|
+
nativeBinding = requireNative()
|
|
575
|
+
}
|
|
537
576
|
|
|
538
577
|
if (!nativeBinding || forceWasi) {
|
|
539
578
|
let wasiBinding = null
|
|
540
|
-
let
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
579
|
+
let wasiBindingLoaded = false
|
|
580
|
+
const wasiBindingErrors = []
|
|
581
|
+
const __napiWasiResolveCandidate = (specifier, isPackage, localArtifacts) => {
|
|
582
|
+
try {
|
|
583
|
+
require.resolve(specifier)
|
|
584
|
+
} catch (resolveError) {
|
|
585
|
+
if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
|
|
586
|
+
throw resolveError
|
|
587
|
+
}
|
|
588
|
+
if (isPackage) {
|
|
589
|
+
try {
|
|
590
|
+
require.resolve(specifier + '/package.json')
|
|
591
|
+
} catch (packageError) {
|
|
592
|
+
if (packageError && packageError.code === 'MODULE_NOT_FOUND') {
|
|
593
|
+
return resolveError
|
|
594
|
+
}
|
|
595
|
+
// An exports restriction proves the package exists even when its
|
|
596
|
+
// package.json is not public. Preserve the root resolution failure.
|
|
597
|
+
throw resolveError
|
|
598
|
+
}
|
|
599
|
+
// The package exists but its main/export target is broken.
|
|
600
|
+
throw resolveError
|
|
601
|
+
}
|
|
602
|
+
return resolveError
|
|
547
603
|
}
|
|
604
|
+
if (localArtifacts) {
|
|
605
|
+
let artifactError = null
|
|
606
|
+
for (let i = 0; i < localArtifacts.length; i++) {
|
|
607
|
+
try {
|
|
608
|
+
require.resolve(localArtifacts[i])
|
|
609
|
+
return null
|
|
610
|
+
} catch (resolveError) {
|
|
611
|
+
if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
|
|
612
|
+
throw resolveError
|
|
613
|
+
}
|
|
614
|
+
artifactError = resolveError
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
return artifactError
|
|
618
|
+
}
|
|
619
|
+
return null
|
|
548
620
|
}
|
|
549
|
-
if (!
|
|
621
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
622
|
+
let candidateError = null
|
|
623
|
+
let candidateFailed = false
|
|
550
624
|
try {
|
|
551
|
-
|
|
552
|
-
|
|
625
|
+
candidateError = __napiWasiResolveCandidate('./rapid-fuzzy.wasi.cjs', false, ['./rapid-fuzzy.wasm32-wasi.debug.wasm', './rapid-fuzzy.wasm32-wasi.wasm'])
|
|
626
|
+
candidateFailed = candidateError !== null
|
|
627
|
+
if (!candidateFailed) {
|
|
628
|
+
wasiBinding = require('./rapid-fuzzy.wasi.cjs')
|
|
629
|
+
nativeBinding = wasiBinding
|
|
630
|
+
wasiBindingLoaded = true
|
|
631
|
+
}
|
|
553
632
|
} catch (err) {
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
633
|
+
candidateError = err
|
|
634
|
+
candidateFailed = true
|
|
635
|
+
}
|
|
636
|
+
if (candidateFailed) {
|
|
637
|
+
wasiBindingErrors.push(candidateError)
|
|
638
|
+
loadErrors.push(candidateError)
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === 'wasm32-wasi')) {
|
|
642
|
+
let candidateError = null
|
|
643
|
+
let candidateFailed = false
|
|
644
|
+
try {
|
|
645
|
+
candidateError = __napiWasiResolveCandidate('rapid-fuzzy-wasm32-wasi', true, undefined)
|
|
646
|
+
candidateFailed = candidateError !== null
|
|
647
|
+
if (!candidateFailed) {
|
|
648
|
+
if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
649
|
+
const bindingPackageVersion = require('rapid-fuzzy-wasm32-wasi/package.json').version
|
|
650
|
+
if (bindingPackageVersion !== '2.1.1') {
|
|
651
|
+
throw new Error(`WASI binding package version mismatch, expected 2.1.1 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
652
|
+
}
|
|
559
653
|
}
|
|
560
|
-
|
|
654
|
+
wasiBinding = require('rapid-fuzzy-wasm32-wasi')
|
|
655
|
+
nativeBinding = wasiBinding
|
|
656
|
+
wasiBindingLoaded = true
|
|
561
657
|
}
|
|
658
|
+
} catch (err) {
|
|
659
|
+
candidateError = err
|
|
660
|
+
candidateFailed = true
|
|
661
|
+
}
|
|
662
|
+
if (candidateFailed) {
|
|
663
|
+
wasiBindingErrors.push(candidateError)
|
|
664
|
+
loadErrors.push(candidateError)
|
|
562
665
|
}
|
|
563
666
|
}
|
|
564
|
-
if (
|
|
565
|
-
|
|
566
|
-
|
|
667
|
+
if (
|
|
668
|
+
!wasiBindingLoaded &&
|
|
669
|
+
forceWasi &&
|
|
670
|
+
!forceWasiError &&
|
|
671
|
+
!__napiWasiFlavorRequested
|
|
672
|
+
) {
|
|
673
|
+
nativeBinding = requireNative()
|
|
674
|
+
}
|
|
675
|
+
if ((forceWasiError || __napiWasiFlavorRequested) && !wasiBindingLoaded) {
|
|
676
|
+
const error = new Error(
|
|
677
|
+
__napiWasiFlavorRequested
|
|
678
|
+
? 'WASI binding for flavor "' + __napiWasiFlavor + '" not found'
|
|
679
|
+
: 'WASI binding not found and NAPI_RS_FORCE_WASI is set to error',
|
|
680
|
+
)
|
|
681
|
+
error.cause = createLoadErrorChain(wasiBindingErrors)
|
|
567
682
|
throw error
|
|
568
683
|
}
|
|
569
684
|
}
|
|
@@ -577,10 +692,7 @@ if (!nativeBinding) {
|
|
|
577
692
|
)
|
|
578
693
|
// assign instead of the `new Error(message, { cause })` options form,
|
|
579
694
|
// which Node < 16.9 silently ignores
|
|
580
|
-
error.cause = loadErrors
|
|
581
|
-
cur.cause = err
|
|
582
|
-
return cur
|
|
583
|
-
})
|
|
695
|
+
error.cause = createLoadErrorChain(loadErrors)
|
|
584
696
|
throw error
|
|
585
697
|
}
|
|
586
698
|
throw new Error(`Failed to load native binding`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapid-fuzzy",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Rust-powered fuzzy search and string distance for JavaScript/TypeScript. Up to 15,000x faster than fuse.js with indexed mode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "derodero24",
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
"engines": {
|
|
106
106
|
"node": ">=22.0.0"
|
|
107
107
|
},
|
|
108
|
-
"packageManager": "pnpm@
|
|
108
|
+
"packageManager": "pnpm@12.4.0",
|
|
109
109
|
"scripts": {
|
|
110
110
|
"build": "napi build --manifest-path crates/core/Cargo.toml --platform --release --js index.js --dts index.d.ts --output-dir .",
|
|
111
111
|
"postbuild": "node scripts/patch-binding.js",
|
|
112
112
|
"build:debug": "napi build --manifest-path crates/core/Cargo.toml --platform --js index.js --dts index.d.ts --output-dir .",
|
|
113
113
|
"build:wasm": "napi build --manifest-path crates/core/Cargo.toml --platform --release --js index.js --dts index.d.ts --output-dir . --target wasm32-wasip1-threads",
|
|
114
|
-
"postbuild:wasm": "node scripts/optimize-wasm.js",
|
|
114
|
+
"postbuild:wasm": "node scripts/optimize-wasm.js && node scripts/patch-binding.js",
|
|
115
115
|
"build:wasm-bindgen": "node scripts/build-wasm-bindgen.js",
|
|
116
116
|
"postbuild:wasm-bindgen": "node scripts/optimize-wasm.js",
|
|
117
117
|
"optimize:wasm": "node scripts/optimize-wasm.js",
|
|
@@ -142,61 +142,43 @@
|
|
|
142
142
|
},
|
|
143
143
|
"devDependencies": {
|
|
144
144
|
"@biomejs/biome": "^2.5.3",
|
|
145
|
-
"@changesets/cli": "^
|
|
145
|
+
"@changesets/cli": "^3.0.2",
|
|
146
146
|
"@codspeed/vitest-plugin": "^5.7.1",
|
|
147
147
|
"@commitlint/cli": "^21.2.1",
|
|
148
148
|
"@commitlint/config-conventional": "^21.2.0",
|
|
149
|
-
"@emnapi/core": "
|
|
150
|
-
"@emnapi/runtime": "
|
|
149
|
+
"@emnapi/core": "2.0.0-alpha.5",
|
|
150
|
+
"@emnapi/runtime": "2.0.0-alpha.5",
|
|
151
151
|
"@leeoniya/ufuzzy": "^1.0.19",
|
|
152
|
-
"@napi-rs/cli": "^3.
|
|
152
|
+
"@napi-rs/cli": "^3.9.1",
|
|
153
153
|
"@napi-rs/wasm-runtime": "^1.1.6",
|
|
154
154
|
"@playwright/test": "^1.61.1",
|
|
155
155
|
"@tybys/wasm-util": "^0.10.3",
|
|
156
156
|
"@types/node": "^24.13.2",
|
|
157
157
|
"@types/string-similarity": "^4.0.2",
|
|
158
158
|
"@vitest/coverage-v8": "^4.1.10",
|
|
159
|
+
"emnapi": "2.0.0-alpha.5",
|
|
159
160
|
"fastest-levenshtein": "^1.0.16",
|
|
160
161
|
"flexsearch": "^0.8.212",
|
|
161
162
|
"fuse.js": "^7.1.0",
|
|
162
163
|
"fuzzball": "^2.2.3",
|
|
163
|
-
"fuzzysort": "^
|
|
164
|
+
"fuzzysort": "^4.0.2",
|
|
164
165
|
"lefthook": "^2.1.4",
|
|
165
166
|
"leven": "^4.1.0",
|
|
166
167
|
"minisearch": "^7.2.0",
|
|
167
168
|
"publint": "^0.3.18",
|
|
168
169
|
"string-similarity": "^4.0.4",
|
|
169
|
-
"typescript": "^
|
|
170
|
+
"typescript": "^7.0.0",
|
|
170
171
|
"vite": "^8.1.4",
|
|
171
172
|
"vitest": "^4.1.10"
|
|
172
173
|
},
|
|
173
|
-
"pnpm": {
|
|
174
|
-
"onlyBuiltDependencies": [
|
|
175
|
-
"lefthook"
|
|
176
|
-
],
|
|
177
|
-
"overrides": {
|
|
178
|
-
"axios": ">=1.15.0",
|
|
179
|
-
"fast-uri": ">=3.1.2",
|
|
180
|
-
"form-data": ">=4.0.6",
|
|
181
|
-
"js-yaml@3": ">=3.15.0 <4.0.0",
|
|
182
|
-
"js-yaml@4": ">=4.2.0",
|
|
183
|
-
"emnapi": "1.11.2"
|
|
184
|
-
},
|
|
185
|
-
"peerDependencyRules": {
|
|
186
|
-
"allowedVersions": {
|
|
187
|
-
"@codspeed/vitest-plugin>vite": "8"
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
174
|
"optionalDependencies": {
|
|
192
|
-
"rapid-fuzzy-darwin-x64": "2.1.
|
|
193
|
-
"rapid-fuzzy-darwin-arm64": "2.1.
|
|
194
|
-
"rapid-fuzzy-linux-x64-gnu": "2.1.
|
|
195
|
-
"rapid-fuzzy-linux-x64-musl": "2.1.
|
|
196
|
-
"rapid-fuzzy-linux-arm64-gnu": "2.1.
|
|
197
|
-
"rapid-fuzzy-linux-arm64-musl": "2.1.
|
|
198
|
-
"rapid-fuzzy-win32-x64-msvc": "2.1.
|
|
199
|
-
"rapid-fuzzy-win32-arm64-msvc": "2.1.
|
|
200
|
-
"rapid-fuzzy-wasm32-wasi": "2.1.0"
|
|
175
|
+
"rapid-fuzzy-darwin-x64": "2.1.1",
|
|
176
|
+
"rapid-fuzzy-darwin-arm64": "2.1.1",
|
|
177
|
+
"rapid-fuzzy-linux-x64-gnu": "2.1.1",
|
|
178
|
+
"rapid-fuzzy-linux-x64-musl": "2.1.1",
|
|
179
|
+
"rapid-fuzzy-linux-arm64-gnu": "2.1.1",
|
|
180
|
+
"rapid-fuzzy-linux-arm64-musl": "2.1.1",
|
|
181
|
+
"rapid-fuzzy-win32-x64-msvc": "2.1.1",
|
|
182
|
+
"rapid-fuzzy-win32-arm64-msvc": "2.1.1"
|
|
201
183
|
}
|
|
202
|
-
}
|
|
184
|
+
}
|
|
@@ -21,14 +21,14 @@ export interface SearchOptions {
|
|
|
21
21
|
export class FuzzyIndex {
|
|
22
22
|
free(): void;
|
|
23
23
|
[Symbol.dispose](): void;
|
|
24
|
-
/**
|
|
25
|
-
* Add a single item to the index.
|
|
26
|
-
*/
|
|
27
|
-
add(item: string): void;
|
|
28
24
|
/**
|
|
29
25
|
* Add multiple items to the index at once.
|
|
30
26
|
*/
|
|
31
27
|
addMany(items: string[]): void;
|
|
28
|
+
/**
|
|
29
|
+
* Add a single item to the index.
|
|
30
|
+
*/
|
|
31
|
+
add(item: string): void;
|
|
32
32
|
/**
|
|
33
33
|
* Find the closest matching string in the index.
|
|
34
34
|
*
|
|
@@ -53,16 +53,16 @@ export class FuzzyIndex {
|
|
|
53
53
|
* Uses swap-remove for O(1) performance. Returns false if out of bounds.
|
|
54
54
|
*/
|
|
55
55
|
remove(index: number): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Search the index, returning only indices and scores (no item strings).
|
|
58
|
+
*/
|
|
59
|
+
searchIndices(query: string, options?: SearchOptions | null): any;
|
|
56
60
|
/**
|
|
57
61
|
* Search the index for items matching the query.
|
|
58
62
|
*
|
|
59
63
|
* Returns matches sorted by score (best match first) as a JS Array.
|
|
60
64
|
*/
|
|
61
65
|
search(query: string, options?: SearchOptions | null): any;
|
|
62
|
-
/**
|
|
63
|
-
* Search the index, returning only indices and scores (no item strings).
|
|
64
|
-
*/
|
|
65
|
-
searchIndices(query: string, options?: SearchOptions | null): any;
|
|
66
66
|
/**
|
|
67
67
|
* Serialize the index to a compact binary format (Uint8Array).
|
|
68
68
|
*/
|
|
@@ -81,12 +81,6 @@ export class FuzzyIndex {
|
|
|
81
81
|
export class KeyedFuzzyIndex {
|
|
82
82
|
free(): void;
|
|
83
83
|
[Symbol.dispose](): void;
|
|
84
|
-
/**
|
|
85
|
-
* Add a single item to the index.
|
|
86
|
-
*
|
|
87
|
-
* `key_values` must be a JS Array of strings with one value per key.
|
|
88
|
-
*/
|
|
89
|
-
add(key_values: any): void;
|
|
90
84
|
/**
|
|
91
85
|
* Add multiple items to the index at once.
|
|
92
86
|
*
|
|
@@ -94,6 +88,12 @@ export class KeyedFuzzyIndex {
|
|
|
94
88
|
* (one per key). Throws if any element has the wrong number of key values.
|
|
95
89
|
*/
|
|
96
90
|
addMany(items_key_values: any): void;
|
|
91
|
+
/**
|
|
92
|
+
* Add a single item to the index.
|
|
93
|
+
*
|
|
94
|
+
* `key_values` must be a JS Array of strings with one value per key.
|
|
95
|
+
*/
|
|
96
|
+
add(key_values: any): void;
|
|
97
97
|
/**
|
|
98
98
|
* Find the index of the closest matching item.
|
|
99
99
|
*/
|
|
@@ -21,15 +21,6 @@ export class FuzzyIndex {
|
|
|
21
21
|
const ptr = this.__destroy_into_raw();
|
|
22
22
|
wasm.__wbg_fuzzyindex_free(ptr, 0);
|
|
23
23
|
}
|
|
24
|
-
/**
|
|
25
|
-
* Add a single item to the index.
|
|
26
|
-
* @param {string} item
|
|
27
|
-
*/
|
|
28
|
-
add(item) {
|
|
29
|
-
const ptr0 = passStringToWasm0(item, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
30
|
-
const len0 = WASM_VECTOR_LEN;
|
|
31
|
-
wasm.fuzzyindex_add(this.__wbg_ptr, ptr0, len0);
|
|
32
|
-
}
|
|
33
24
|
/**
|
|
34
25
|
* Add multiple items to the index at once.
|
|
35
26
|
* @param {string[]} items
|
|
@@ -39,6 +30,15 @@ export class FuzzyIndex {
|
|
|
39
30
|
const len0 = WASM_VECTOR_LEN;
|
|
40
31
|
wasm.fuzzyindex_addMany(this.__wbg_ptr, ptr0, len0);
|
|
41
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Add a single item to the index.
|
|
35
|
+
* @param {string} item
|
|
36
|
+
*/
|
|
37
|
+
add(item) {
|
|
38
|
+
const ptr0 = passStringToWasm0(item, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
39
|
+
const len0 = WASM_VECTOR_LEN;
|
|
40
|
+
wasm.fuzzyindex_add(this.__wbg_ptr, ptr0, len0);
|
|
41
|
+
}
|
|
42
42
|
/**
|
|
43
43
|
* Find the closest matching string in the index.
|
|
44
44
|
*
|
|
@@ -57,7 +57,7 @@ export class FuzzyIndex {
|
|
|
57
57
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
58
58
|
let v2;
|
|
59
59
|
if (r0 !== 0) {
|
|
60
|
-
v2 = getStringFromWasm0(r0, r1)
|
|
60
|
+
v2 = getStringFromWasm0(r0, r1);
|
|
61
61
|
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
62
62
|
}
|
|
63
63
|
return v2;
|
|
@@ -117,29 +117,29 @@ export class FuzzyIndex {
|
|
|
117
117
|
return ret !== 0;
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
120
|
-
* Search the index
|
|
121
|
-
*
|
|
122
|
-
* Returns matches sorted by score (best match first) as a JS Array.
|
|
120
|
+
* Search the index, returning only indices and scores (no item strings).
|
|
123
121
|
* @param {string} query
|
|
124
122
|
* @param {SearchOptions | null} [options]
|
|
125
123
|
* @returns {any}
|
|
126
124
|
*/
|
|
127
|
-
|
|
125
|
+
searchIndices(query, options) {
|
|
128
126
|
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
129
127
|
const len0 = WASM_VECTOR_LEN;
|
|
130
|
-
const ret = wasm.
|
|
128
|
+
const ret = wasm.fuzzyindex_searchIndices(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
131
129
|
return takeObject(ret);
|
|
132
130
|
}
|
|
133
131
|
/**
|
|
134
|
-
* Search the index
|
|
132
|
+
* Search the index for items matching the query.
|
|
133
|
+
*
|
|
134
|
+
* Returns matches sorted by score (best match first) as a JS Array.
|
|
135
135
|
* @param {string} query
|
|
136
136
|
* @param {SearchOptions | null} [options]
|
|
137
137
|
* @returns {any}
|
|
138
138
|
*/
|
|
139
|
-
|
|
139
|
+
search(query, options) {
|
|
140
140
|
const ptr0 = passStringToWasm0(query, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
141
141
|
const len0 = WASM_VECTOR_LEN;
|
|
142
|
-
const ret = wasm.
|
|
142
|
+
const ret = wasm.fuzzyindex_search(this.__wbg_ptr, ptr0, len0, isLikeNone(options) ? 0 : addHeapObject(options));
|
|
143
143
|
return takeObject(ret);
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
@@ -193,15 +193,16 @@ export class KeyedFuzzyIndex {
|
|
|
193
193
|
wasm.__wbg_keyedfuzzyindex_free(ptr, 0);
|
|
194
194
|
}
|
|
195
195
|
/**
|
|
196
|
-
* Add
|
|
196
|
+
* Add multiple items to the index at once.
|
|
197
197
|
*
|
|
198
|
-
* `
|
|
199
|
-
*
|
|
198
|
+
* `items_key_values` is a JS Array where each element is an Array of strings
|
|
199
|
+
* (one per key). Throws if any element has the wrong number of key values.
|
|
200
|
+
* @param {any} items_key_values
|
|
200
201
|
*/
|
|
201
|
-
|
|
202
|
+
addMany(items_key_values) {
|
|
202
203
|
try {
|
|
203
204
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
204
|
-
wasm.
|
|
205
|
+
wasm.keyedfuzzyindex_addMany(retptr, this.__wbg_ptr, addHeapObject(items_key_values));
|
|
205
206
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
206
207
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
207
208
|
if (r1) {
|
|
@@ -212,16 +213,15 @@ export class KeyedFuzzyIndex {
|
|
|
212
213
|
}
|
|
213
214
|
}
|
|
214
215
|
/**
|
|
215
|
-
* Add
|
|
216
|
+
* Add a single item to the index.
|
|
216
217
|
*
|
|
217
|
-
* `
|
|
218
|
-
*
|
|
219
|
-
* @param {any} items_key_values
|
|
218
|
+
* `key_values` must be a JS Array of strings with one value per key.
|
|
219
|
+
* @param {any} key_values
|
|
220
220
|
*/
|
|
221
|
-
|
|
221
|
+
add(key_values) {
|
|
222
222
|
try {
|
|
223
223
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
224
|
-
wasm.
|
|
224
|
+
wasm.keyedfuzzyindex_add(retptr, this.__wbg_ptr, addHeapObject(key_values));
|
|
225
225
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
226
226
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
227
227
|
if (r1) {
|
|
@@ -373,7 +373,7 @@ export function closest(query, items, min_score) {
|
|
|
373
373
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
374
374
|
let v3;
|
|
375
375
|
if (r0 !== 0) {
|
|
376
|
-
v3 = getStringFromWasm0(r0, r1)
|
|
376
|
+
v3 = getStringFromWasm0(r0, r1);
|
|
377
377
|
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
378
378
|
}
|
|
379
379
|
return v3;
|
|
@@ -1171,11 +1171,11 @@ export function weightedRatioMany(reference, candidates, score_cutoff) {
|
|
|
1171
1171
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1172
1172
|
}
|
|
1173
1173
|
}
|
|
1174
|
-
export function
|
|
1174
|
+
export function __wbg_Error_67e7344beaa85059(arg0, arg1) {
|
|
1175
1175
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
1176
1176
|
return addHeapObject(ret);
|
|
1177
1177
|
}
|
|
1178
|
-
export function
|
|
1178
|
+
export function __wbg_Number_c54e7112a3fa7e3e(arg0) {
|
|
1179
1179
|
const ret = Number(getObject(arg0));
|
|
1180
1180
|
return ret;
|
|
1181
1181
|
}
|
|
@@ -1186,46 +1186,46 @@ export function __wbg_String_8564e559799eccda(arg0, arg1) {
|
|
|
1186
1186
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1187
1187
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1188
1188
|
}
|
|
1189
|
-
export function
|
|
1189
|
+
export function __wbg___wbindgen_boolean_get_7a12af2b3f899c5a(arg0) {
|
|
1190
1190
|
const v = getObject(arg0);
|
|
1191
1191
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
1192
1192
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
1193
1193
|
}
|
|
1194
|
-
export function
|
|
1194
|
+
export function __wbg___wbindgen_debug_string_0e68cf47c9cbd9b0(arg0, arg1) {
|
|
1195
1195
|
const ret = debugString(getObject(arg1));
|
|
1196
1196
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1197
1197
|
const len1 = WASM_VECTOR_LEN;
|
|
1198
1198
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1199
1199
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1200
1200
|
}
|
|
1201
|
-
export function
|
|
1201
|
+
export function __wbg___wbindgen_in_50072d4d6e45c193(arg0, arg1) {
|
|
1202
1202
|
const ret = getObject(arg0) in getObject(arg1);
|
|
1203
1203
|
return ret;
|
|
1204
1204
|
}
|
|
1205
|
-
export function
|
|
1205
|
+
export function __wbg___wbindgen_is_function_fcda5e3902d732fe(arg0) {
|
|
1206
1206
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
1207
1207
|
return ret;
|
|
1208
1208
|
}
|
|
1209
|
-
export function
|
|
1209
|
+
export function __wbg___wbindgen_is_object_edb6b15aa3afe12e(arg0) {
|
|
1210
1210
|
const val = getObject(arg0);
|
|
1211
1211
|
const ret = typeof(val) === 'object' && val !== null;
|
|
1212
1212
|
return ret;
|
|
1213
1213
|
}
|
|
1214
|
-
export function
|
|
1214
|
+
export function __wbg___wbindgen_is_undefined_8c687d0b90d5b524(arg0) {
|
|
1215
1215
|
const ret = getObject(arg0) === undefined;
|
|
1216
1216
|
return ret;
|
|
1217
1217
|
}
|
|
1218
|
-
export function
|
|
1218
|
+
export function __wbg___wbindgen_jsval_loose_eq_3c30021c243b64cd(arg0, arg1) {
|
|
1219
1219
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1220
1220
|
return ret;
|
|
1221
1221
|
}
|
|
1222
|
-
export function
|
|
1222
|
+
export function __wbg___wbindgen_number_get_1dc732b810cb937c(arg0, arg1) {
|
|
1223
1223
|
const obj = getObject(arg1);
|
|
1224
1224
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
1225
1225
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
1226
1226
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
1227
1227
|
}
|
|
1228
|
-
export function
|
|
1228
|
+
export function __wbg___wbindgen_string_get_92ab86bb19cbc12f(arg0, arg1) {
|
|
1229
1229
|
const obj = getObject(arg1);
|
|
1230
1230
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
1231
1231
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1233,22 +1233,22 @@ export function __wbg___wbindgen_string_get_965592073e5d848c(arg0, arg1) {
|
|
|
1233
1233
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1234
1234
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1235
1235
|
}
|
|
1236
|
-
export function
|
|
1236
|
+
export function __wbg___wbindgen_throw_5d9e815e6fdf150f(arg0, arg1) {
|
|
1237
1237
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1238
1238
|
}
|
|
1239
|
-
export function
|
|
1239
|
+
export function __wbg_call_269c5566fbede3eb() { return handleError(function (arg0, arg1) {
|
|
1240
1240
|
const ret = getObject(arg0).call(getObject(arg1));
|
|
1241
1241
|
return addHeapObject(ret);
|
|
1242
1242
|
}, arguments); }
|
|
1243
|
-
export function
|
|
1243
|
+
export function __wbg_done_cffed884d87aa22e(arg0) {
|
|
1244
1244
|
const ret = getObject(arg0).done;
|
|
1245
1245
|
return ret;
|
|
1246
1246
|
}
|
|
1247
|
-
export function
|
|
1247
|
+
export function __wbg_get_6cf5a4d4d8ad3c5a() { return handleError(function (arg0, arg1) {
|
|
1248
1248
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
1249
1249
|
return addHeapObject(ret);
|
|
1250
1250
|
}, arguments); }
|
|
1251
|
-
export function
|
|
1251
|
+
export function __wbg_get_unchecked_363572bdd397d473(arg0, arg1) {
|
|
1252
1252
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
1253
1253
|
return addHeapObject(ret);
|
|
1254
1254
|
}
|
|
@@ -1256,7 +1256,7 @@ export function __wbg_get_with_ref_key_6412cf3094599694(arg0, arg1) {
|
|
|
1256
1256
|
const ret = getObject(arg0)[getObject(arg1)];
|
|
1257
1257
|
return addHeapObject(ret);
|
|
1258
1258
|
}
|
|
1259
|
-
export function
|
|
1259
|
+
export function __wbg_instanceof_ArrayBuffer_d4ff01f8247925ae(arg0) {
|
|
1260
1260
|
let result;
|
|
1261
1261
|
try {
|
|
1262
1262
|
result = getObject(arg0) instanceof ArrayBuffer;
|
|
@@ -1266,7 +1266,7 @@ export function __wbg_instanceof_ArrayBuffer_eab9f28fbec23477(arg0) {
|
|
|
1266
1266
|
const ret = result;
|
|
1267
1267
|
return ret;
|
|
1268
1268
|
}
|
|
1269
|
-
export function
|
|
1269
|
+
export function __wbg_instanceof_Uint8Array_598adc0fef426aa8(arg0) {
|
|
1270
1270
|
let result;
|
|
1271
1271
|
try {
|
|
1272
1272
|
result = getObject(arg0) instanceof Uint8Array;
|
|
@@ -1276,65 +1276,65 @@ export function __wbg_instanceof_Uint8Array_57d77acd50e4c44d(arg0) {
|
|
|
1276
1276
|
const ret = result;
|
|
1277
1277
|
return ret;
|
|
1278
1278
|
}
|
|
1279
|
-
export function
|
|
1279
|
+
export function __wbg_isArray_5674713bb7b79043(arg0) {
|
|
1280
1280
|
const ret = Array.isArray(getObject(arg0));
|
|
1281
1281
|
return ret;
|
|
1282
1282
|
}
|
|
1283
|
-
export function
|
|
1283
|
+
export function __wbg_isSafeInteger_8f51c743827d1ec5(arg0) {
|
|
1284
1284
|
const ret = Number.isSafeInteger(getObject(arg0));
|
|
1285
1285
|
return ret;
|
|
1286
1286
|
}
|
|
1287
|
-
export function
|
|
1287
|
+
export function __wbg_iterator_22ddeb808cf55a6f() {
|
|
1288
1288
|
const ret = Symbol.iterator;
|
|
1289
1289
|
return addHeapObject(ret);
|
|
1290
1290
|
}
|
|
1291
|
-
export function
|
|
1291
|
+
export function __wbg_length_31bdaf014f5fbde2(arg0) {
|
|
1292
1292
|
const ret = getObject(arg0).length;
|
|
1293
1293
|
return ret;
|
|
1294
1294
|
}
|
|
1295
|
-
export function
|
|
1295
|
+
export function __wbg_length_4e1adc0d42e23620(arg0) {
|
|
1296
1296
|
const ret = getObject(arg0).length;
|
|
1297
1297
|
return ret;
|
|
1298
1298
|
}
|
|
1299
|
-
export function
|
|
1300
|
-
const ret = new
|
|
1299
|
+
export function __wbg_new_1da3429bc3c4541c(arg0) {
|
|
1300
|
+
const ret = new Uint8Array(getObject(arg0));
|
|
1301
1301
|
return addHeapObject(ret);
|
|
1302
1302
|
}
|
|
1303
|
-
export function
|
|
1304
|
-
const ret = new
|
|
1303
|
+
export function __wbg_new_bebc3f4757acf305() {
|
|
1304
|
+
const ret = new Object();
|
|
1305
1305
|
return addHeapObject(ret);
|
|
1306
1306
|
}
|
|
1307
|
-
export function
|
|
1308
|
-
const ret = new
|
|
1307
|
+
export function __wbg_new_ffa92086ea89f79c() {
|
|
1308
|
+
const ret = new Array();
|
|
1309
1309
|
return addHeapObject(ret);
|
|
1310
1310
|
}
|
|
1311
|
-
export function
|
|
1311
|
+
export function __wbg_next_95053e306b1c3aed(arg0) {
|
|
1312
1312
|
const ret = getObject(arg0).next;
|
|
1313
1313
|
return addHeapObject(ret);
|
|
1314
1314
|
}
|
|
1315
|
-
export function
|
|
1315
|
+
export function __wbg_next_f31ecb8646d2c605() { return handleError(function (arg0) {
|
|
1316
1316
|
const ret = getObject(arg0).next();
|
|
1317
1317
|
return addHeapObject(ret);
|
|
1318
1318
|
}, arguments); }
|
|
1319
|
-
export function
|
|
1319
|
+
export function __wbg_prototypesetcall_ae9f5e7459250748(arg0, arg1, arg2) {
|
|
1320
1320
|
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
|
|
1321
1321
|
}
|
|
1322
|
+
export function __wbg_set_13d25b81ab403f5e(arg0, arg1, arg2) {
|
|
1323
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1324
|
+
}
|
|
1322
1325
|
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
1323
1326
|
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
1324
1327
|
}
|
|
1325
|
-
export function
|
|
1326
|
-
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
1327
|
-
}
|
|
1328
|
-
export function __wbg_value_f852716acdeb3e82(arg0) {
|
|
1328
|
+
export function __wbg_value_c227f843d21da141(arg0) {
|
|
1329
1329
|
const ret = getObject(arg0).value;
|
|
1330
1330
|
return addHeapObject(ret);
|
|
1331
1331
|
}
|
|
1332
|
-
export function
|
|
1332
|
+
export function __wbindgen_generic_0000000000000001(arg0) {
|
|
1333
1333
|
// Cast intrinsic for `F64 -> Externref`.
|
|
1334
1334
|
const ret = arg0;
|
|
1335
1335
|
return addHeapObject(ret);
|
|
1336
1336
|
}
|
|
1337
|
-
export function
|
|
1337
|
+
export function __wbindgen_generic_0000000000000002(arg0, arg1) {
|
|
1338
1338
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
1339
1339
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
1340
1340
|
return addHeapObject(ret);
|
|
Binary file
|