{"id":21865668,"url":"https://github.com/codesvault/localdb","last_synced_at":"2026-04-12T03:02:36.613Z","repository":{"id":130781071,"uuid":"408684324","full_name":"CodesVault/localdb","owner":"CodesVault","description":"LocalDB is a CRAD module for NodeJS using FileSystem.","archived":false,"fork":false,"pushed_at":"2021-09-25T09:30:46.000Z","size":17,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-26T15:46:32.065Z","etag":null,"topics":["crud-api","hacktoberfest","node-library","nodejs","npm","npm-module","npm-package"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@abmsourav/localdb","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodesVault.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-21T04:14:40.000Z","updated_at":"2022-10-03T16:56:04.000Z","dependencies_parsed_at":"2023-06-03T18:45:18.349Z","dependency_job_id":null,"html_url":"https://github.com/CodesVault/localdb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Flocaldb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Flocaldb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Flocaldb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodesVault%2Flocaldb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodesVault","download_url":"https://codeload.github.com/CodesVault/localdb/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244868753,"owners_count":20523591,"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":["crud-api","hacktoberfest","node-library","nodejs","npm","npm-module","npm-package"],"created_at":"2024-11-28T04:17:23.106Z","updated_at":"2025-12-30T23:56:25.115Z","avatar_url":"https://github.com/CodesVault.png","language":"JavaScript","readme":"# LocalDB\nLocalDB is a NodeJS CRUD API. \nIt uses local file system for CRUD operation. It's a promise based API.\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n## Installation\n`npm i @abmsourav/localdb`\n\n\u003cbr\u003e\n\n## API\n\n**GET** `localDB.get()`\n\n**POST** `localDB.set(jsonObject)`\n\n**INSERT** `localDB.insert(jsonObject, jsonObject)`\n\n**UPDATE** `localDB.update(jsonObject, jsonObject)`\n\n**DELETE** `localDB.remove(jsonObject)`\n\n**SEARCH** `localDB.search(string, string, bool)`\n\n**SEARCH** `localDB.searchByValue(string, bool)`\n\n\u003cbr\u003e\n\n## Initialization\ncreate a json file on your project root and initialize like below.\nPlease note: It must be a json file.\n```js\nconst ldb = localDB('./db.json');\n```\n\n\u003cbr\u003e\n\n## API Uses\n```js\nconst {localDB} = require('@abmsourav/localdb');\nconst ldb = localDB('./db.json');\n\nconst data = {names: \"Sourav\", email: \"keramotul.islam@gmail.com\"};\n\n// add new data\nldb.set(data)\n\t.catch( (err) =\u003e console.log(err) );\n\n// Insert data on and existing object\nldb.insert({\"id\": \"1247flsf\"}, {\"Full Name\": \"Keramot UL Islam\"})\t// 1. find the object, 2. add property and value\n\t.catch( (err) =\u003e console.log(err) );\n\n// get data from localDB\nldb.get()\n\t.then( (data) =\u003e console.log(data) ) // [ {name: 'Sourav', email: 'keramotul.islam@gmail.com'} ]\n\t.catch( (err) =\u003e console.log(err) );\n\n// update data\nldb.update({\"id\": \"abm\"}, {name: \"AbmSourav\"}) // args: 1.where update'll made, 2.new data\n\t.catch( err =\u003e console.log(err) );\n\n// Delete data\nldb.remove({name: \"Abm Sourav\"})\n\t.catch( err =\u003e console.log(err) );\n\n// Search unique data\nldb.search(\"id\", \"123454ls\")\t// key and value\n\t.then( data =\u003e console.log(data) );\n\n// search all matches data\nldb.search(\"name\", \"Sourav\", false)\t// key, value and unique\n\t.then( data =\u003e console.log(data) );\n\n// Search all data that matches this value \nldb.searchByValue(\"Abm Sourav\")\n\t.then( data =\u003e console.log(data) );\n\n// Search unique data that matches the value\nldb.searchByValue(\"Abm Sourav\", true)\n\t.then( data =\u003e console.log(data) );\n\n```\n\n\u003cbr\u003e\n\n.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesvault%2Flocaldb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesvault%2Flocaldb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesvault%2Flocaldb/lists"}