hnswlib-wasm
Advanced tools
Comparing version 0.0.1-beta.8 to 0.0.1-beta.9
@@ -46,14 +46,14 @@ /***************** GENERATED FILE ********************/ | ||
if (isNode) { | ||
if (typeof document !== "undefined") { | ||
// this is electron | ||
const temp = (await import("./hnswlib.js")) as any; | ||
const temp2 = await temp?.(); | ||
const temp3 = temp2 ? esmModule : esmModule.default; | ||
console.log(temp, temp2, temp3, esmModule); | ||
factory = temp2 | ||
} | ||
else { | ||
// if (typeof document !== "undefined") { | ||
// // this is electron | ||
// const temp = (await import("./hnswlib.js")) as any; | ||
// const temp2 = await temp?.(); | ||
// const temp3 = temp2 ? esmModule : esmModule.default; | ||
// console.log(temp, temp2, temp3, esmModule); | ||
// factory = temp2 | ||
// } | ||
// else { | ||
const modulePath = require.resolve("./hnswlib.js"); | ||
factory = require(modulePath); | ||
} | ||
// } | ||
} else { | ||
@@ -60,0 +60,0 @@ const temp = (await import("./hnswlib.js")); |
{ | ||
"name": "hnswlib-wasm", | ||
"version": "0.0.1-beta.8", | ||
"version": "0.0.1-beta.9", | ||
"description": "typescript and wasm bindings for Hnswlib", | ||
@@ -22,5 +22,8 @@ "main": "./dist/hnswlib-wasm.umd.cjs", | ||
"approximate nearest neighbor search", | ||
"machine learning" | ||
"machine learning", | ||
"wasm", | ||
"typescript", | ||
"emscripten", | ||
"embeddings" | ||
], | ||
"gypfile": true, | ||
"scripts": { | ||
@@ -27,0 +30,0 @@ "prepare": "husky install", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3754608
29336