{"_id":"closevector-hnswlib-node","_rev":"2-9e048633f390a89d3ef4489831c690cc","name":"closevector-hnswlib-node","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.0-alpha.1":{"name":"closevector-hnswlib-node","version":"0.1.0-alpha.1","description":"Node.js bindings for Hnswlib","main":"lib/index.js","types":"lib/index.d.ts","homepage":"https://closevector-docs.getmegaportal.com/","author":{"name":"jo32"},"license":"Apache-2.0","keywords":["hnswlib","approximate nearest neighbor search","machine learning"],"gypfile":true,"scripts":{"build":"node-gyp build","rebuild":"node-gyp rebuild","test":"jest","doc":"typedoc","install":"node-gyp rebuild"},"dependencies":{"bindings":"^1.5.0","node-addon-api":"^7.0.0"},"devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","@types/node":"^20.1.3","eslint":"^8.10.0","eslint-plugin-jest":"^27.1.6","eslint-plugin-jest-extended":"^2.0.0","eslint-plugin-node":"^11.1.0","husky":"^8.0.2","jest":"^29.3.1","jest-extended":"^4.0.0","node-gyp":"^9.3.0","typedoc":"^0.24.1","typescript":"^5.0.4","yarn-release":"^1.10.3"},"gitHead":"3f9198f23a16785d1673d3fc072467ea864e32a0","_id":"closevector-hnswlib-node@0.1.0-alpha.1","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-WRD4MOEvsB1+wO4kEWeoZMruRW6Dvwa0yH4+j76ABFG06EK9fJsKGHHcTlI5IVgrKndln2zsNZlF26pfGf8UDg==","shasum":"50d91c50d549a0bb2e4cf0537de6b5071de018fe","tarball":"https://registry.npmjs.org/closevector-hnswlib-node/-/closevector-hnswlib-node-0.1.0-alpha.1.tgz","fileCount":15,"unpackedSize":179913,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDao9eG923Xe6VYUCXGAwHe1a3NuY1cUgz9DcM3d9q5iAIhAPCkqAmYO3xAaWhY+C+jCfP3c1abOrKSK4c/7+blns07"}]},"_npmUser":{"name":"jo32","email":"j.jolam@gmail.com"},"directories":{},"maintainers":[{"name":"jo32","email":"j.jolam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/closevector-hnswlib-node_0.1.0-alpha.1_1693580454697_0.68705642272441"},"_hasShrinkwrap":false},"0.1.0-alpha.2":{"name":"closevector-hnswlib-node","version":"0.1.0-alpha.2","description":"Node.js bindings for Hnswlib","main":"lib/index.js","types":"lib/index.d.ts","homepage":"https://closevector-docs.getmegaportal.com/","author":{"name":"jo32"},"license":"Apache-2.0","keywords":["hnswlib","approximate nearest neighbor search","machine learning"],"gypfile":true,"dependencies":{"bindings":"^1.5.0","node-addon-api":"^7.0.0"},"devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","@types/node":"^20.1.3","eslint":"^8.10.0","eslint-plugin-jest":"^27.1.6","eslint-plugin-jest-extended":"^2.0.0","eslint-plugin-node":"^11.1.0","husky":"^8.0.2","jest":"^29.3.1","jest-extended":"^4.0.0","node-gyp":"^9.3.0","typedoc":"^0.24.1","typescript":"^5.1.6","yarn-release":"^1.10.3"},"scripts":{"build":"node-gyp build","rebuild":"node-gyp rebuild","test":"jest","doc":"typedoc","install":"node-gyp rebuild"},"_id":"closevector-hnswlib-node@0.1.0-alpha.2","_integrity":"sha512-4AsGbACcGAAv0huYslPVfaIdS0Z9dkXt9l2MRkme4Ysbc9JNQ7EPc+WsmcjCy1sYYeEO9SLKujX8+xawr7MdNQ==","_resolved":"/private/var/folders/nv/2zsh04kd2hg6d02svr6cfvkw0000gn/T/bd2996e4aedb0d0f3b66c0440f232a1d/closevector-hnswlib-node-0.1.0-alpha.2.tgz","_from":"file:closevector-hnswlib-node-0.1.0-alpha.2.tgz","_nodeVersion":"16.15.1","_npmVersion":"8.11.0","dist":{"integrity":"sha512-4AsGbACcGAAv0huYslPVfaIdS0Z9dkXt9l2MRkme4Ysbc9JNQ7EPc+WsmcjCy1sYYeEO9SLKujX8+xawr7MdNQ==","shasum":"6c806f6012bc973c440a60869012addbe76d8b3c","tarball":"https://registry.npmjs.org/closevector-hnswlib-node/-/closevector-hnswlib-node-0.1.0-alpha.2.tgz","fileCount":15,"unpackedSize":179912,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHrNKD0m2FX6XWRLdgQo4T0ZF5p+ZxadF/HCLyCSsvWgIgAtlEhxVUhljEAmLbxalExYMljUwK8rz2P3LggDK2aS0="}]},"_npmUser":{"name":"jo32","email":"j.jolam@gmail.com"},"directories":{},"maintainers":[{"name":"jo32","email":"j.jolam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/closevector-hnswlib-node_0.1.0-alpha.2_1696518845323_0.6362588424750992"},"_hasShrinkwrap":false},"0.1.1":{"name":"closevector-hnswlib-node","version":"0.1.1","description":"Node.js bindings for Hnswlib","main":"lib/index.js","types":"lib/index.d.ts","homepage":"https://closevector-docs.getmegaportal.com/","author":{"name":"jo32"},"license":"Apache-2.0","keywords":["hnswlib","approximate nearest neighbor search","machine learning"],"gypfile":true,"dependencies":{"bindings":"^1.5.0","node-addon-api":"^7.0.0"},"devDependencies":{"@commitlint/cli":"^17.3.0","@commitlint/config-conventional":"^17.3.0","@types/node":"^20.1.3","eslint":"^8.10.0","eslint-plugin-jest":"^27.1.6","eslint-plugin-jest-extended":"^2.0.0","eslint-plugin-node":"^11.1.0","husky":"^8.0.2","jest":"^29.3.1","jest-extended":"^4.0.0","node-gyp":"^9.3.0","typedoc":"^0.24.1","typescript":"^5.1.6","yarn-release":"^1.10.3"},"scripts":{"build":"node-gyp build","rebuild":"node-gyp rebuild","test":"jest","doc":"typedoc","install":"node-gyp rebuild"},"_id":"closevector-hnswlib-node@0.1.1","_integrity":"sha512-2/lOw/L0yx5qFIQ4o7/+WqZoG7xOjfZbwQ3mmgrMs/6VSQMSXBvp8xKpZtntjADxi8J4TIYiAAxiWu953lvr5A==","_resolved":"/private/var/folders/nv/2zsh04kd2hg6d02svr6cfvkw0000gn/T/c7e72cb56ddc5fd06a010a3c57a664d4/closevector-hnswlib-node-0.1.1.tgz","_from":"file:closevector-hnswlib-node-0.1.1.tgz","_nodeVersion":"20.10.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-2/lOw/L0yx5qFIQ4o7/+WqZoG7xOjfZbwQ3mmgrMs/6VSQMSXBvp8xKpZtntjADxi8J4TIYiAAxiWu953lvr5A==","shasum":"59c503e3e78277f39971fdc6935b63e59ad35a12","tarball":"https://registry.npmjs.org/closevector-hnswlib-node/-/closevector-hnswlib-node-0.1.1.tgz","fileCount":15,"unpackedSize":180178,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3G42m2GCzBCRXquT9L8zV4HTlcN2muQ/W3neiXjrxrwIgb6YvmOdeZKWSbB3RjLkEYLl35yuBtEr8yCx7L49Y5OI="}]},"_npmUser":{"name":"jo32","email":"j.jolam@gmail.com"},"directories":{},"maintainers":[{"name":"jo32","email":"j.jolam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/closevector-hnswlib-node_0.1.1_1706799395361_0.7967828108512438"},"_hasShrinkwrap":false}},"time":{"created":"2023-09-01T15:00:54.697Z","0.1.0-alpha.1":"2023-09-01T15:00:54.827Z","modified":"2024-02-01T14:56:35.663Z","0.1.0-alpha.2":"2023-10-05T15:14:05.515Z","0.1.1":"2024-02-01T14:56:35.533Z"},"maintainers":[{"name":"jo32","email":"j.jolam@gmail.com"}],"description":"Node.js bindings for Hnswlib","homepage":"https://closevector-docs.getmegaportal.com/","keywords":["hnswlib","approximate nearest neighbor search","machine learning"],"author":{"name":"jo32"},"license":"Apache-2.0","readme":"# closevector-hnswlib-node\n\n> This package is modified from [hnswlib-node](https://github.com/yoshoku/hnswlib-node) to make the output work with closevector-hnswlib-web. All APIs are the same as hnswlib-node. you can refer to hnswlib-node for documentations.\n\n[![npm version](https://badge.fury.io/js/hnswlib-node.svg)](https://badge.fury.io/js/hnswlib-node)\n[![Build Status](https://github.com/yoshoku/hnswlib-node/actions/workflows/build.yml/badge.svg)](https://github.com/yoshoku/hnswlib-node/actions/workflows/build.yml)\n[![License](https://img.shields.io/badge/License-Apache%202.0-yellowgreen.svg)](https://github.com/yoshoku/hnswlib-node/blob/main/LICENSE.txt)\n[![Documentation](https://img.shields.io/badge/api-reference-blue.svg)](https://yoshoku.github.io/hnswlib-node/doc/)\n\nhnswlib-node provides Node.js bindings for [Hnswlib](https://github.com/nmslib/hnswlib)\nthat implements approximate nearest-neghbor search based on\nhierarchical navigable small world graphs.\n\n## Installation\n\n```sh\n$ npm install hnswlib-node\n```\n\n## Documentation\n\n* [hnswlib-node API Documentation](https://yoshoku.github.io/hnswlib-node/doc/)\n* [How to run hnswlib-node on AWS Lambda](https://github.com/yoshoku/hnswlib-node/wiki/How-to-run-hnswlib-node-on-AWS-Lambda)\n\n## Usage\n\nGenerating search index:\n\n```typescript\nimport { HierarchicalNSW } from 'hnswlib-node';\n\nconst numDimensions = 8; // the length of data point vector that will be indexed.\nconst maxElements = 10; // the maximum number of data points.\n\n// declaring and intializing index.\nconst index = new HierarchicalNSW('l2', numDimensions);\nindex.initIndex(maxElements);\n\n// inserting data points to index.\nfor (let i = 0; i < maxElements; i++) {\n  const point = new Array(numDimensions);\n  for (let j = 0; j < numDimensions; j++) point[j] = Math.random();\n  index.addPoint(point, i);\n}\n\n// saving index.\nindex.writeIndexSync('foo.dat');\n```\n\nSearching nearest neighbors:\n\n```typescript\nimport { HierarchicalNSW } from 'hnswlib-node';\n\n// loading index.\nconst index = new HierarchicalNSW('l2', 3);\nindex.readIndexSync('foo.dat');\n\n// preparing query data points.\nconst numDimensions = 8;\nconst query = new Array(numDimensions);\nfor (let j = 0; j < numDimensions; j++) query[j] = Math.random();\n\n// searching k-nearest neighbor data points.\nconst numNeighbors = 3;\nconst result = index.searchKnn(query, numNeighbors);\n\nconsole.table(result);\n```\n\n## License\n\nhnswlib-node is available as open source under the terms of the [Apache-2.0 License](https://www.apache.org/licenses/LICENSE-2.0).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/yoshoku/hnswlib-node.\nThis project is intended to be a safe, welcoming space for collaboration,\nand contributors are expected to adhere to the [Contributor Covenant](https://contributor-covenant.org) code of conduct.\n","readmeFilename":"README.md"}