{"id":48803565,"url":"https://github.com/ismailcankaratas/dbcopycat","last_synced_at":"2026-04-14T04:05:48.630Z","repository":{"id":37043128,"uuid":"497134998","full_name":"ismailcankaratas/dbcopycat","owner":"ismailcankaratas","description":"A JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.","archived":false,"fork":false,"pushed_at":"2023-02-11T14:59:21.000Z","size":1561,"stargazers_count":16,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-04T04:08:15.951Z","etag":null,"topics":["collaborate","database","db","db-json","dbcopycat","json","json-db","nodejs"],"latest_commit_sha":null,"homepage":"http://ismailcankaratas.com.tr/dbcopycat/","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/ismailcankaratas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["ismailcankaratas"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-05-27T20:51:18.000Z","updated_at":"2023-09-24T10:59:16.000Z","dependencies_parsed_at":"2024-10-21T18:35:39.042Z","dependency_job_id":null,"html_url":"https://github.com/ismailcankaratas/dbcopycat","commit_stats":{"total_commits":30,"total_committers":3,"mean_commits":10.0,"dds":0.5,"last_synced_commit":"4c505c97fd27c3a9cb317a9af217679968aad5ed"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ismailcankaratas/dbcopycat","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailcankaratas%2Fdbcopycat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailcankaratas%2Fdbcopycat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailcankaratas%2Fdbcopycat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailcankaratas%2Fdbcopycat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ismailcankaratas","download_url":"https://codeload.github.com/ismailcankaratas/dbcopycat/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ismailcankaratas%2Fdbcopycat/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31781318,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: 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":["collaborate","database","db","db-json","dbcopycat","json","json-db","nodejs"],"created_at":"2026-04-14T04:05:48.582Z","updated_at":"2026-04-14T04:05:48.623Z","avatar_url":"https://github.com/ismailcankaratas.png","language":"JavaScript","funding_links":["https://github.com/sponsors/ismailcankaratas"],"categories":[],"sub_categories":[],"readme":"# What is dbcopycat\n\nA JSON Database that saves your Json data in a file and makes it easy for you to perform CRUD operations.\n\n\u003c!-- TOC --\u003e\n- [Motivation](#motivation)\n- [Features](#features)\n- [Getting started](#getting-started)\n    - [Installation](#install-database-copycat)\n    - [Commands](#commands)\n        - [getall()](#getall)\n        - [getById(arrayName, dataId)](#getbyidarrayname-dataid)\n        - [add(arrayName, data)](#addarrayname-data)\n        - [deleteById(arrayName, dataId)](#deletebyidarrayname-dataid)\n        - [update(arrayName, data)](#updatearrayname-data)\n        - [filter(arrayName, condition)](#filterarrayname-condition)\n        - [find(arrayName, condition)](#findarrayname-condition)\n- [License](#license)\n\u003c!-- TOC --\u003e\n\n# Motivation\n\nIn small web projects, database connection is very troublesome and unnecessary in projects we usually do to improve ourselves. That's why we make use of `static json` files. Why don't we make our static json file `dynamic` with minimal code?\n\n# Features\n\n- Make your `static json` file `dynamic`.\n- Get persistent json data.\n- Get rid of database fees and hassle.\n- It is so fast compared to other databases that it behaves as if it is a static data. 'NO WAITING TIME'.\n\n# Getting started\n\nStart converting your static json file to dynamic json file!\n## Install Database Copycat\n\n```sh\n$ npm i -g dbcopycat\n```\n\nThen...\n\n```sh\n$ dbcopycat init\n```\nGenerates a `db.json` file with some data\n# Commands\n##  getAll()\nFetch all data\n\n```js\nconst dbcopycat = require('dbcopycat');\n\nvar data = dbcopycat.getAll();\n``` \n\n##  getById(arrayName, dataId)\nReturns the data that matches the data id\n\n```js\nconst dbcopycat = require('dbcopycat');\n\ndbcopycat.getById(arrayName, dataId);\n```\n\n##  add(arrayName, data)\nAdds data to data\n```js\nconst dbcopycat = require('dbcopycat');\n\nvar data = {\n    \"id\": 2,\n    \"categoryId\": 1,\n    \"productName\": \"Chang\",\n    \"quantityPerUnit\": \"24 - 12 oz bottles\",\n    \"unitPrice\": \"21\",\n    \"unitsInStock\": 17\n}\n\ndbcopycat.add(\"arrayName\", data);\n```\n\n##  deleteById(arrayName, dataId)\nDeletes data that matches the data ID\n\n```js\nconst dbcopycat = require('dbcopycat');\n\ndbcopycat.deleteById(arrayName, dataId);\n```\n\n##  update(arrayName, data)\nUpdates data that matches the data id\n\n```js\nconst dbcopycat = require('dbcopycat');\n\ndbcopycat.update(arrayName, data);\n```\n\n##  filter(arrayName, condition)\nFilters data by condition\n\n```js\nconst dbcopycat = require('dbcopycat');\n\ndbcopycat.filter(\"arrayName\", x =\u003e x.id == 1)\n```\n\n##  find(arrayName, condition)\nReturns a single data suitable for the condition\n\n```js\nconst dbcopycat = require('dbcopycat');\n\ndbcopycat.find(\"arrayName\", x =\u003e x.categoryid == 1)\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismailcankaratas%2Fdbcopycat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fismailcankaratas%2Fdbcopycat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fismailcankaratas%2Fdbcopycat/lists"}