{"id":47770514,"url":"https://github.com/esosdb/esosdb","last_synced_at":"2026-04-04T20:22:14.372Z","repository":{"id":152006780,"uuid":"625152905","full_name":"esosdb/esosdb","owner":"esosdb","description":"Little database for you as local.(You can create big database)","archived":false,"fork":false,"pushed_at":"2024-07-04T09:10:02.000Z","size":62,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-03T07:56:57.285Z","etag":null,"topics":["database","esosdb","json","local"],"latest_commit_sha":null,"homepage":"","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/esosdb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-04-08T08:17:43.000Z","updated_at":"2025-04-21T23:01:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"a0a36353-0b0e-4f2c-a3ef-a06e85d5d5c2","html_url":"https://github.com/esosdb/esosdb","commit_stats":null,"previous_names":["ramazaneris/esosdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esosdb/esosdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esosdb%2Fesosdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esosdb%2Fesosdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esosdb%2Fesosdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esosdb%2Fesosdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esosdb","download_url":"https://codeload.github.com/esosdb/esosdb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esosdb%2Fesosdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31344464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-03T08:03:20.796Z","status":"ssl_error","status_checked_at":"2026-04-03T08:00:37.834Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","esosdb","json","local"],"created_at":"2026-04-03T09:02:48.953Z","updated_at":"2026-04-04T20:22:14.357Z","avatar_url":"https://github.com/esosdb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# esosdb\r\n\r\n## Description\r\n\r\nYou can easily create a database locally.\r\n\r\nMore details in the [Docs](https://esosdb.itsram.co/)\r\n\r\n## Contents\r\n\r\n- [Setup classic Database](#setup-classic-database)\r\n  - [set()](#set)\r\n  - [get()](#get)\r\n  - [delete()](#delete)\r\n  - [push()](#push)\r\n  - [unpush()](#deletebyid)\r\n  - [getAll()](#getall)\r\n  - [deleteAll()](#deleteall)\r\n- [Setup advanced Database](#setup-advanced-database)\r\n  - [create()](#create)\r\n  - [deleteById()](#deleteById)\r\n  - [findByElement()](#findByElement)\r\n  - [findById()](#findById)\r\n  - [updateById()](#updateById)\r\n\r\n## Badges\r\n\r\n[![NPM Downloads](https://img.shields.io/npm/dt/esosdb.svg?style=flat-square)](https://www.npmjs.com/package/esosdb)\r\n\r\n## Install\r\n\r\n\u003e npm i esosdb\r\n\r\n## Setup Classic Database\r\n\r\nCommonJS\r\n\r\n```js\r\nconst { Database } = require(\"esosdb\");\r\nconst db = new Database({\r\n  path: \"./esosdb/db.json\", // this is default, can write the what you want\r\n  space: 2, //should be a number (default:0)\r\n});\r\n```\r\n\r\nEsModule\r\n\r\n```js\r\nimport { Database } from \"esosdb\";\r\nconst db = new Database({\r\n  path: \"./esosdb/db.json\", // this is default, can write the what you want\r\n  space: 2, //should be a number (default:0)\r\n});\r\n```\r\n\r\n## Examples\r\n\r\n### set\r\n\r\n```js\r\ndb.set(\"main\", {}, (err,data) =\u003e {\r\n  console.log(data); // logs the {main:{}}\r\n});\r\n\r\ndb.set(\"main.name\", \"esosdb\", (err,data) =\u003e {\r\n  console.log(data); // logs the {name:\"esosdb\"}\r\n});\r\n\r\ndb.set(\"main.version\", \"2.1.0\", (err,data) =\u003e {\r\n  console.log(data); // logs the {name:\"esosdb\",version:\"2.1.0\"}\r\n});\r\n```\r\n\r\n### get\r\n\r\n```js\r\nconsole.log(db.get(\"main.name\")); //logs the \"esosdb\"\r\n```\r\n\r\n### delete\r\n\r\n```js\r\ndb.delete(\"main.version\", (err,data) =\u003e {\r\n  console.log(data); // logs the {name:\"esosdb\"} because version is deleted\r\n});\r\n```\r\n\r\n### push\r\n\r\n```js\r\ndb.push(\"main.dependencies\", \"fs\", (err,data) =\u003e {\r\n  console.log(data); // logs the {name:\"esosdb\",dependencies:[\"fs\"]}\r\n});\r\n```\r\n\r\n### unpush\r\n\r\n```js\r\ndb.unpush(\"main.dependencies\", \"fs\", (err,data) =\u003e {\r\n  console.log(data); // logs the {name:\"esosdb\",dependencies:[]}\r\n});\r\n```\r\n\r\n### getAll\r\n\r\n```js\r\nconsole.log(db.getAll()); // logs the {main:{name:\"esos\"}}\r\n```\r\n\r\n### deleteAll\r\n\r\n```js\r\ndb.deleteAll((err,data) =\u003e {\r\n  console.log(data); // logs the {}\r\n});\r\n```\r\n\r\n## Setup Advanced Database\r\n\r\nCommonJS\r\n\r\n```js\r\nconst { AdvancedDatabase, CreateSchema } = require(\"esosdb\");\r\nconst adb = new AdvancedDatabase({ name: \"advanceddb\", space: 2 });\r\nconst ExampleSchema = new CreateSchema({\r\n  connect: adb,\r\n  name: \"example\",\r\n  props: { \r\n    name: { \r\n        type: \"string\", \r\n        required: true,\r\n    } \r\n  }, //if you don't add any id then id will be generated randomly\r\n  timestamps: true,\r\n});\r\n```\r\n\r\nEsModule\r\n\r\n```js\r\nimport { AdvancedDatabase, CreateSchema } from \"esosdb\";\r\nconst adb = new AdvancedDatabase({ name: \"advanceddb\", space: 2 });\r\nconst ExampleSchema = new CreateSchema({\r\n  connect: adb,\r\n  name: \"example\",\r\n  props: { \r\n    name: { \r\n        type: \"string\", \r\n        required: true,\r\n    } \r\n  }, //if you don't add any id then id will be generated randomly\r\n  timestamps: true,\r\n});\r\n```\r\n\r\n### create\r\n\r\n```js\r\nExampleSchema.create({ name: \"example\" }, (err,data) =\u003e {\r\n  console.log(data);\r\n  /*\r\n   {\r\n      id:\"uniqueId\",\r\n      name:\"example\",\r\n      updatedAt: \"1970-01-01T00:00:00.000Z\",\r\n      createdAt: \"1970-01-01T00:00:00.000Z\"\r\n   }\r\n   */\r\n});\r\n```\r\n\r\n### deleteById\r\n\r\n```js\r\nExampleSchema.deleteById(\"id\", (err,data) =\u003e {\r\n  console.log(data); // {}\r\n});\r\n```\r\n\r\n### findByElement\r\n\r\n```js\r\nExampleSchema.findByElement({ name: \"example\" }, (err,data) =\u003e {\r\n  console.log(data); //[...foundDatas]\r\n});\r\n```\r\n\r\n### findById\r\n\r\n```js\r\nExampleSchema.findById(\"uniqueId\", (err,data) =\u003e {\r\n  console.log(data);\r\n  /*\r\n  {\r\n    name:\"Example\",\r\n    //... \r\n  }\r\n  */\r\n});\r\n```\r\n\r\n### updateById\r\n\r\n```js\r\nExampleSchema.updateById(\"id\", { name: \"example in the end\" }, (err,data) =\u003e {\r\n  console.log(data);\r\n  /*\r\n  //changes\r\n  {\r\n    name:\"example in the end\",\r\n    updatedAt:\"last edited time\"\r\n  }\r\n  */\r\n});\r\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesosdb%2Fesosdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesosdb%2Fesosdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesosdb%2Fesosdb/lists"}