{"id":23400109,"url":"https://github.com/khalby786/jsoning","last_synced_at":"2025-04-09T12:07:06.358Z","repository":{"id":44687773,"uuid":"261213861","full_name":"khalby786/jsoning","owner":"khalby786","description":"✨ A simple key-value JSON-based lightweight database. ✨","archived":false,"fork":false,"pushed_at":"2024-03-27T08:06:45.000Z","size":5229,"stargazers_count":93,"open_issues_count":0,"forks_count":10,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T03:43:23.334Z","etag":null,"topics":["async","database","datastore","hacktoberfest","javascript","json","key-value","nodejs","npm"],"latest_commit_sha":null,"homepage":"http://jsoning.js.org/","language":"TypeScript","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/khalby786.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","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":{"custom":"https://www.buymeacoffee.com/khaleelgibran"}},"created_at":"2020-05-04T14:57:02.000Z","updated_at":"2024-12-23T03:58:36.000Z","dependencies_parsed_at":"2024-06-18T15:27:43.209Z","dependency_job_id":null,"html_url":"https://github.com/khalby786/jsoning","commit_stats":{"total_commits":247,"total_committers":10,"mean_commits":24.7,"dds":0.2753036437246964,"last_synced_commit":"58bdb2f4378a42a821462b4f206da4390377be6a"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalby786%2Fjsoning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalby786%2Fjsoning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalby786%2Fjsoning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalby786%2Fjsoning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalby786","download_url":"https://codeload.github.com/khalby786/jsoning/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036063,"owners_count":21037092,"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":["async","database","datastore","hacktoberfest","javascript","json","key-value","nodejs","npm"],"created_at":"2024-12-22T10:19:38.632Z","updated_at":"2025-04-09T12:07:06.328Z","avatar_url":"https://github.com/khalby786.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/khaleelgibran"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/khalby786/jsoning/master/media/jsoning.svg\" alt=\"jsoning\" width=\"250px\"\u003e\n\n✨ A simple key-value JSON-based lightweight database. ✨\n\n\u003cbr /\u003e\n\n![CodeCov](https://codecov.io/gh/khalby786/jsoning/branch/master/graph/badge.svg)\n[![Build Status](https://travis-ci.org/khalby786/jsoning.svg?branch=master)](https://travis-ci.org/khalby786/jsoning)\n[![Latest Stable Version](https://img.shields.io/npm/v/jsoning.svg)](https://www.npmjs.com/package/jsoning)\n[![NPM Downloads](https://img.shields.io/npm/dm/jsoning.svg)](https://www.npmjs.com/package/jsoning)\n![node-current](https://img.shields.io/node/v/jsoning)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkhalby786%2Fjsoning.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkhalby786%2Fjsoning?ref=badge_shield)\n\n\u003cbr /\u003e\n\n[View Demo](https://glitch.com/edit/#!/jsoning) · [Report Bug](https://github.com/khalby786/jsoning/issues) · [Request Feature](https://github.com/khalby786/jsoning/issues)\n\n\u003c/div\u003e\n\n---\n\nJsoning is a simplified wrapper for Node.js that lets you write and read data to and from JSON files. It's designed to be beginner-friendly and easy to use, with a simple API that makes it easy to get started with. It's perfect for small projects, prototyping, and learning how to work with databases.\n\n\n## Features\n\n- Use existing JSON files to read and write key-value pairs\n- EventEmitters to listen to changes in the database\n- Atomic file writing to prevent data corruption\n- Easier to use than a toaster\n- TypeScript support for all the fixed-type addicts out there\n\n## Install\n\n**Node.js v16.x or greater is required for this package to work.**\n\n```bash\nnpm i jsoning\n\n# pnpm if you're feeling fast\npnpm i jsoning\n\n# yarn if you're feeling fancy\nyarn add jsoning\n```\n\nView the full documentation [here](https://jsoning.js.org/).\n\n## Basic Usage \n\n```ts\nimport { Jsoning, MathOps } from 'jsoning';\nconst db = new Jsoning('database.json');\n\n// Set some values with a key\nawait db.set('birthday', '07-aug');\nawait db.set('age', '13');\n\n// Push stuff to an array for a particular key\nawait db.push('transformers', 'optimus prime');\nawait db.push('transformers', 'bumblebee');\nawait db.push('transformers', 'iron hide');\n\n// Get the value of a key\nconsole.log(await db.get('transformers')); // [ 'optimus prime', 'bumblebee', 'iron hide' ]\n\n// Get all the values\nconsole.log(await db.all()); // { Record\u003cstring, JSONValue\u003e of the whole database contents }\n\n// does such a value exist?\nconsole.log(await db.has('value2')); // false\n\n// My age keeps changing, so I'm deleting it\nconsole.log(await db.delete('age')); // true\n\n// I got $100 for my birthday\nawait db.set('money', 100);\n\n// and someone gave me $200 more\nawait db.math('money', MathOps.Add, 200);\n\n// Just wanna make sure how much money I got\nconsole.log(await db.get\u003cnumber\u003e('money')); // 300\n\n// RIP iron hide, he died\nawait db.remove('transformers', 'iron hide');\n\n// I'm getting bored, so I'm clearing the whole database\nawait db.clear();\n```\n\n## Contributing\n\nPlease see `CONTRIBUTING.md` for more details on contributing!\n\n### Contributors\n\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n[![All Contributors](https://img.shields.io/badge/all_contributors-9-orange.svg?style=flat-square)](#contributors-)\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctbody\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/khalby786\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/38468163?v=4?s=100\" width=\"100px;\" alt=\"Khaleel Gibran\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKhaleel Gibran\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=khalby786\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/commits?author=khalby786\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#design-khalby786\" title=\"Design\"\u003e🎨\u003c/a\u003e \u003ca href=\"#infra-khalby786\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/commits?author=khalby786\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#tutorial-khalby786\" title=\"Tutorials\"\u003e✅\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://aboutdavid.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/62346025?v=4?s=100\" width=\"100px;\" alt=\"David\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eDavid\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=aboutDavid\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/Jonyk56\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/44901605?v=4?s=100\" width=\"100px;\" alt=\"Jonyk56\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eJonyk56\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=Jonyk56\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/ayntee\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/34645569?v=4?s=100\" width=\"100px;\" alt=\"ayntee\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eayntee\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=ayntee\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://xetha-bot.me/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/46276781?v=4?s=100\" width=\"100px;\" alt=\"undefine\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eundefine\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=oadpoaw\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/issues?q=author%3Aoadpoaw\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e \u003ca href=\"#security-oadpoaw\" title=\"Security\"\u003e🛡️\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://github.com/adi-g15\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/37269665?v=4?s=100\" width=\"100px;\" alt=\"Aditya Gupta\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eAditya Gupta\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=adi-g15\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"http://www.creativepragmatics.com\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/142797?v=4?s=100\" width=\"100px;\" alt=\"Manuel Maly\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eManuel Maly\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=manmal\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/issues?q=author%3Amanmal\" title=\"Bug reports\"\u003e🐛\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://wh0.github.io/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/382796?v=4?s=100\" width=\"100px;\" alt=\"wh0\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ewh0\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=wh0\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n      \u003ctd align=\"center\" valign=\"top\" width=\"14.28%\"\u003e\u003ca href=\"https://akpi.is-a.dev/\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/111009970?v=4?s=100\" width=\"100px;\" alt=\"akpi816218\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eakpi816218\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/khalby786/jsoning/commits?author=akpi816218\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/commits?author=akpi816218\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#example-akpi816218\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#maintenance-akpi816218\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/khalby786/jsoning/commits?author=akpi816218\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#tool-akpi816218\" title=\"Tools\"\u003e🔧\u003c/a\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/tbody\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://allcontributors.org) specification.\nContributions of any kind are welcome!\n\n## License\n\nThis package is open sourced under the [MIT License](https://github.com/khalby786/jsoning/blob/master/LICENSE.md).\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fkhalby786%2Fjsoning.svg?type=small)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkhalby786%2Fjsoning?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalby786%2Fjsoning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalby786%2Fjsoning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalby786%2Fjsoning/lists"}