mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-10-02 08:06:42 +02:00
worker index basic support export/import
This commit is contained in:
9
dist/module-debug/worker.js
vendored
9
dist/module-debug/worker.js
vendored
@@ -1,6 +1,7 @@
|
||||
import { IndexOptions } from "./type.js";
|
||||
import { create_object, is_function, is_object, is_string } from "./common.js";
|
||||
import handler from "./worker/handler.js";
|
||||
import apply_async from "./async.js";
|
||||
|
||||
let pid = 0;
|
||||
|
||||
@@ -90,10 +91,16 @@ register("append");
|
||||
register("search");
|
||||
register("update");
|
||||
register("remove");
|
||||
register("clear");
|
||||
register("export");
|
||||
register("import");
|
||||
|
||||
apply_async(WorkerIndex.prototype);
|
||||
|
||||
function register(key) {
|
||||
|
||||
WorkerIndex.prototype[key] = WorkerIndex.prototype[key + "Async"] = async function () {
|
||||
WorkerIndex.prototype[key] =
|
||||
/*WorkerIndex.prototype[key + "Async"] =*/async function () {
|
||||
const self = this,
|
||||
args = [].slice.call(arguments),
|
||||
arg = args[args.length - 1];
|
||||
|
Reference in New Issue
Block a user