{"id":15041242,"url":"https://github.com/fsh-org/fshdb","last_synced_at":"2026-02-17T11:01:54.795Z","repository":{"id":222654664,"uuid":"758011338","full_name":"fsh-org/FshDB","owner":"fsh-org","description":"A lightweight \u0026 fast json database with the essentials and more","archived":false,"fork":false,"pushed_at":"2025-03-10T19:31:25.000Z","size":48,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-28T08:11:10.296Z","etag":null,"topics":["databases","db","fsh","json","npm","package"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/fshdb","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/fsh-org.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-15T12:57:34.000Z","updated_at":"2025-03-10T19:27:54.000Z","dependencies_parsed_at":"2024-05-18T08:22:00.571Z","dependency_job_id":"8e7eb540-1e05-4608-842d-fdfdd3fc3eb1","html_url":"https://github.com/fsh-org/FshDB","commit_stats":null,"previous_names":["fsh-org/fshdb"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsh-org%2FFshDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsh-org%2FFshDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsh-org%2FFshDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsh-org%2FFshDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsh-org","download_url":"https://codeload.github.com/fsh-org/FshDB/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248950013,"owners_count":21188194,"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","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":["databases","db","fsh","json","npm","package"],"created_at":"2024-09-24T20:45:48.174Z","updated_at":"2026-02-17T11:01:49.757Z","avatar_url":"https://github.com/fsh-org.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FshDB\nA lightweight \u0026 fast json database with the essentials and more\n\n```js\n// Require the base db\nconst DB = require('fshdb');\n\n// Creating the db\nlet fsh = new DB();\n\n// Setting data\nfsh.set('key', 'value');\n```\n\n## Constructor\nDB(file, options)\n- `file` - Optional, File where the db will be, relative, Default: `DB.json`\n- `options` - Optional\n  - `compact` - Compact db files\n  - `warm` - Does not store to file, good for cache\n\n## Base Functions\n- `set(key, value)` - Sets a value to a key (can be any standard type)\n- `get(key)` - Gets the value of a key\n- `has(key)` - Checks for a key in the db return true or false\n- `remove(key)` - Removes a key from the db\n- `find(function)` - Returns a list of keys which values follow the function\n- `keys()` - List of all the keys on the db\n- `values()` - List of all the values on the db\n- `all()` - Gets the whole database as object\n- `backup(file)` - Backups the db file to another file (big dbs will take some time)\n\n### Number values\nFunctions for values that are of type number (Values will be converted)\n- `add(key, number)` - Adds the number to the current\n- `sub(key, number)` - Subtracts the number to the current\n\n### Array values\nFunctions for values that are of type array\n- `push(key, value)` - Pushes value into the list element\n- `pull(key, index)` - Removes element at index\n- `pop(key)` - Removes last element (return removed value)\n- `flat(key)` - Flattens array at key\n- `concat(key, value)` - Concats a array to the current one\n\n### Object values\nFunctions for values that are of type object/json\nYou can add `.` inside the keys to denote access of a further object\nExample of `.`: `key.key2` for { key: { key2: 'Hello', key1: 'Bye' } } is 'Hello'\nSo far this can be used for get and set\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsh-org%2Ffshdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsh-org%2Ffshdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsh-org%2Ffshdb/lists"}