{"id":13448695,"url":"https://github.com/maple3142/apps-script-db","last_synced_at":"2025-03-22T17:32:15.855Z","repository":{"id":78559218,"uuid":"126563366","full_name":"maple3142/apps-script-db","owner":"maple3142","description":"A key-value database by Google Apps Script","archived":false,"fork":false,"pushed_at":"2018-09-12T07:07:55.000Z","size":871,"stargazers_count":24,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-28T15:41:58.521Z","etag":null,"topics":["apps-script","database","google-apps-script","simple"],"latest_commit_sha":null,"homepage":"https://maple3142.github.io/apps-script-db/","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/maple3142.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}},"created_at":"2018-03-24T03:45:47.000Z","updated_at":"2024-08-21T20:04:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"5dca7c2e-49a9-4649-a140-2f92664be55f","html_url":"https://github.com/maple3142/apps-script-db","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/maple3142%2Fapps-script-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2Fapps-script-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2Fapps-script-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maple3142%2Fapps-script-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maple3142","download_url":"https://codeload.github.com/maple3142/apps-script-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244995559,"owners_count":20544369,"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":["apps-script","database","google-apps-script","simple"],"created_at":"2024-07-31T06:00:17.752Z","updated_at":"2025-03-22T17:32:15.503Z","avatar_url":"https://github.com/maple3142.png","language":"JavaScript","readme":"# Apps Script DB\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmaple3142%2Fapps-script-db.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmaple3142%2Fapps-script-db?ref=badge_shield)\n\n\n\u003e A module to provide a simple key-value based database by [Google Apps Script](https://developers.google.com/apps-script/)\n\n## Get Database URL\n\n1. Go to [https://script.google.com/home](https://script.google.com/home)\n2. Create a script with content of [db.js](https://github.com/maple3142/apps-script-db/blob/master/db.js) file and save with any project name you want\n3. Click \"Publish\" -\u003e \"Deploy as web app...\"\n4. Set \"Who has access to the app:\" to \"Anyone, even anonymous\"\n5. Click \"Deploy\" and copy the URL\n\n## Usage\n\n### Node\n\n\u003e `npm i --save apps-script-db`\n\n```js\nconst ADB = require('apps-script-db')\nconst fetch = require('node-fetch')\nconst db = new ADB(YOUR_DATABASE_URL, fetch)\n\n(async ()=\u003e{\n  await db.set('key', {a: 5})\n  await db.get('key') //{a: 5}\n})()\n```\n\n### Browser\n\n```html\n\u003cscript src=\"https://unpkg.com/apps-script-db\"\u003e\u003c/script\u003e\n\u003cscript\u003e\nconst db = new ADB(YOUR_DATABASE_URL)\n\u003c/script\u003e\n```\n\n## UI Database Editor\n\nURL: [https://maple3142.github.io/apps-script-db/](https://maple3142.github.io/apps-script-db/)\n\nThe web app is on branch [`webui`](https://github.com/maple3142/apps-script-db/tree/webui), based on [Vue](https://github.com/vuejs/vue).\n\n## API\n\n### `db.set(key: string, value: string)`\n\nSet the value of `key` to `value`\n\n### `db.get(key: string)`\n\nGet the value of `key`\n\n\u003e if `key === '*'`, it will return an object with all values\n\n### `db.del(key: string)`\n\nDelete the value of `key`\n\n\u003e if `key === '*'`, it will **delete everything**\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fmaple3142%2Fapps-script-db.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fmaple3142%2Fapps-script-db?ref=badge_large)","funding_links":[],"categories":["Libraries"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaple3142%2Fapps-script-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaple3142%2Fapps-script-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaple3142%2Fapps-script-db/lists"}