{"id":13547892,"url":"https://github.com/blahah/yunodb","last_synced_at":"2025-09-18T13:15:10.148Z","repository":{"id":57404785,"uuid":"56769833","full_name":"blahah/yunodb","owner":"blahah","description":"A portable, persistent, electron-embeddable fulltext search + document store database for node.js","archived":false,"fork":false,"pushed_at":"2017-07-02T04:41:12.000Z","size":1080,"stargazers_count":254,"open_issues_count":8,"forks_count":17,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-08-09T19:41:45.935Z","etag":null,"topics":["database","electron","fulltext-search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blahah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-21T11:57:32.000Z","updated_at":"2025-07-23T21:22:53.000Z","dependencies_parsed_at":"2022-09-26T17:01:38.498Z","dependency_job_id":null,"html_url":"https://github.com/blahah/yunodb","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/blahah/yunodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fyunodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fyunodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fyunodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fyunodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blahah","download_url":"https://codeload.github.com/blahah/yunodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blahah%2Fyunodb/sbom","scorecard":{"id":242425,"data":{"date":"2025-08-11","repo":{"name":"github.com/blahah/yunodb","commit":"290a4ffec2094cf97bce260a88df1281931f4779"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":1,"reason":"Found 3/27 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 6 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-17T06:54:25.979Z","repository_id":57404785,"created_at":"2025-08-17T06:54:25.980Z","updated_at":"2025-08-17T06:54:25.980Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275128947,"owners_count":25410374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-14T02:00:10.474Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","electron","fulltext-search"],"created_at":"2024-08-01T12:01:02.764Z","updated_at":"2025-09-18T13:15:10.112Z","avatar_url":"https://github.com/blahah.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","electron"],"sub_categories":[],"readme":"## yunodb\n\nA portable, persistent, electron compatible fulltext search + document store database for node.js. LevelDB underneath.\n\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard%20js-green.svg?style=flat-square)](https://github.com/feross/standard)  [![Travis](https://img.shields.io/travis/blahah/yunodb.svg?style=flat-square)](https://travis-ci.org/blahah/yunodb)  [![npm](https://img.shields.io/npm/v/yunodb.svg?style=flat-square)](https://www.npmjs.com/package/yunodb)  [![cc-zero](https://img.shields.io/badge/license-CC0%20public%20domain-ff69b4.svg?style=flat-square)](https://github.com/blahah/yunodb#license---cc0)\n\n- [How it works](https://github.com/blahah/yunodb#how-it-works)\n- [Install](https://github.com/blahah/yunodb#install)\n- [Use](https://github.com/blahah/yunodb#use)\n  - [Create / load a database](https://github.com/blahah/yunodb#create--load-a-database)\n    - [Index mapping](https://github.com/blahah/yunodb#index-mapping)\n  - [Add documents](https://github.com/blahah/yunodb#add-documents)\n  - [Delete documents](https://github.com/blahah/yunodb#delete-documents)\n  - [Search](https://github.com/blahah/yunodb#search)\n  - [CLI](https://github.com/blahah/yunodb#cli)\n- [Contributing](https://github.com/blahah/yunodb#contributing)\n- [License - CC0](https://github.com/blahah/yunodb#license---cc0)\n\n## How it works\n\nyuno is a JSON document store with fulltext search. It's meant for embedding in electron apps, focuses solely on text search, and in most cases should handle millions of documents easily.\n\nyuno is pretty basic - it has three components:\n- The document store, which is just the raw JSON objects stored in [leveldb](https://github.com/Level/levelup)\n- The inverted search index, powered by [search-index](https://github.com/fergiemcdowall/search-index)\n- A customisable [natural](https://github.com/NaturalNode/natural) language processing pipeline that is applied to documents before adding them to the index, greatly improving speed and memory usage compared to the vanilla search-index.\n\n**None of this is revolutionary** - actually it's standard in fulltext-search database engines. And all the pieces exist already in the node ecosystem. But I couldn't find a node fulltext search and document store that could handle millions of documents, persisted on disk, didn't have crazy memory requirements and could be easily bundled into an electron app.\n\nLike, db, **y** **u** **no** exist already??\n\n![yuno.jpg](yuno.jpg)\n\n## Install\n\n```\nnpm install --save yunodb\n```\n\n## Use\n\n### Create / load a database\n\n**`yuno(options, callback)`**\n\ne.g.\n\n```\nvar yuno = require('yunodb')\n\nvar dbopts = {\n  location: './.yuno',\n  keyField: 'id',\n  indexMap: ['text']\n}\nvar db = yuno(dbopts, (err, dbhandle) =\u003e {\n  if (err) throw err\n\n  // do stuff with the db\n  db = dbhandle\n})\n```\n\n`opts` configures the two persistent datastores. Possible key-value pairs are:\n\n- **location** (String, required) - Base directory in which both datastores will be kept.\n- **keyField** (String, required) - [JSONpath](https://github.com/s3u/JSONPath#syntax-through-examples) specifying the field in each document to be used as a key in the document store.\n- **indexMap** (Array | Object, required) - [JSONpaths](https://github.com/s3u/JSONPath#syntax-through-examples) specifying the fields in each document to index for fulltext searching. See [index mapping](#index-mapping) below for details.\n- **deletable** (Boolean, optional) - Whether documents should be deletable. Setting to true increases index size. Default: false.\n- **ngramLength** (Integer | Array, optional) - ngram length(s) to use when building index.\n\n#### Index mapping\n\nIt is quite rare that all fields in a database should be exposed to the user search. More often, we want to allow the user to search certain fields, but retrieve the full document for each result. The `indexMap` option allows you to specify how to index documents.\n\nThere are two ways to tell `yuno` how to index:\n\n##### 1. Pass an Array of fields\n\nThe simple option - an array of fields to index. The contents of each field will be passed through the default Natural Language Processing pipeline before being added to the search index.\n\n##### 2. Pass an Object mapping fields to processors\n\nTo fine-tune the processing on a per-field basis, pass an Object where each key is a field to index. Values can be one of:\n\n- `true`/`false` whether to apply the default NLP pipeline\n- `function` a custom processing function.\n\nCustom processing take the field value as a single argument, and their return value (either a string or an array) will be tokenised and added to the index.\n\n### Add documents\n\n**`db.add(documents, options, callback)`**\n\n- `documents`, array of JSON-able objects to store\n- `options` optional, can override the database-wide `indexMap` option\n- `callback`, function to call on completion, with a single argument to be passed an error if there was one\n\ne.g.\n\n```js\nvar docs = [\n  { id: 1, text: 'hello '},\n  { id: 2, text: 'goodbye '},\n  { id: 3, text: 'tortoise '}\n]\n\nfunction done (err) {\n  if (err) throw err\n  console.log('successfully added', docs.length, 'documents')\n}\n\ndb.add(docs, done)\n```\n\nor using a custom `indexMap`:\n\n```js\n// trim whitespace\nfunction trim (str) { return str.trim() }\n\ndb.add(docs, { text: trim }, doneAdding)\n```\n\n### Delete documents\n\n**`db.del(documents, callback)`**\n\n- `documents`, document (object), id (string), or array of documents or ids\n- `callback`, function to call on completion, with a single argument to be passed an error if there was one\n\ne.g.\n\n```js\n// document\ndb.del({ id: '1234', otherkey: 'something else' }, done)\n\n// with id\ndb.del('1234', done)\n\n// array\ndb.del(['1234', '1235', '1236'], done)\n```\n\n### Search\n\n**`db.search(query, opts, callback)`**\n\nReturns a cursor that can be used to page through the results. By default the `pageSize` is 50.\n\n- `query`, string search query\n- `opts`, (optional) options object\n- `callback`, function to call on completion. Takes two arguments:\n  - `err` error or `null`\n  - `results` object containing the result metadata and hits\n\ne.g.\n\n```js\nvar cursor = db.search('tortoise', function(err, results) {\n  if (err) throw err\n\n  // first 50 results\n  console.log(results)\n\n  cursor.next(function(err, results) {\n    // next page in here\n  })\n})\n```\n\n### CLI\n\nyuno has a minimal command-line interface that can be used to create a database from a file containing JSON objects.\n\nInstall the CLI:\n\n```bash\nnpm install --global yuno\n```\n\nCreate a new database:\n\n```bash\nyuno create \u003cdatabase path\u003e \u003cJSON data\u003e\n```\n\nThe JSON data file must contain JSON objects, rather than an array. For example:\n\n```json\n{ \"id\": \"1234\", \"title\": \"the coleopterist's handbook\" }\n{ \"id\": \"4321\", \"title\": \"bark and ambrosia beetles of south america\" }\n```\n\nYou can provide database options as a JSON file using the `--opts` argument:\n\n```bash\nyuno create --opts \u003cJSON options\u003e \u003cdatabase path\u003e \u003cJSON data\u003e\n```\n\nWhere the options JSON looks like:\n\n```json\n{\n  \"keyField\": \"id\",\n  \"indexMap\": {\n    \"title\": true,\n  }\n}\n```\n\n## Contributing\n\nyuno is being built to serve my use-case of embedding pre-made databases in electron apps. If you have another use-case and would like features added, please open an issue to discuss it - I'm happy to add things that will be widely useful.\n\nContributions are very welcome. **Please** open an issue to discuss any changes you would like to PR, or mention in an existing issue that you plan to work on it.\n\nIdeas for improving performance are particularly welcome.\n\n## License - CC0\n\nhttps://creativecommons.org/publicdomain/zero/1.0/\n\nyuno is public domain code. Do whatever you want with it. Credit would be appreciated, but it's not required.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fyunodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblahah%2Fyunodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblahah%2Fyunodb/lists"}