{"id":24200620,"url":"https://github.com/ankcorn/beedi","last_synced_at":"2025-03-03T10:13:06.028Z","repository":{"id":57189423,"uuid":"306494277","full_name":"Ankcorn/beedi","owner":"Ankcorn","description":"An opinionated and lightweight library of helpers for building lambdas","archived":false,"fork":false,"pushed_at":"2020-11-19T17:01:37.000Z","size":28,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-14T00:52:04.975Z","etag":null,"topics":["aws","dependency-injection","lambdas","serverless"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ankcorn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-23T00:57:02.000Z","updated_at":"2020-11-19T17:01:40.000Z","dependencies_parsed_at":"2022-09-15T06:02:24.960Z","dependency_job_id":null,"html_url":"https://github.com/Ankcorn/beedi","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/Ankcorn%2Fbeedi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankcorn%2Fbeedi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankcorn%2Fbeedi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ankcorn%2Fbeedi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ankcorn","download_url":"https://codeload.github.com/Ankcorn/beedi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241644566,"owners_count":19996179,"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":["aws","dependency-injection","lambdas","serverless"],"created_at":"2025-01-13T20:50:56.105Z","updated_at":"2025-03-03T10:13:06.002Z","avatar_url":"https://github.com/Ankcorn.png","language":"JavaScript","readme":"# BeeDI / 🐝 DI\n\nBeeDI is an opinionated and lightweight library of helpers for building lambdas. It helps you build tidy and testable lambda functions.\nIt simplifies interfacing with aws event sources by limiting and preparsing the input. The aim is to support all the most common event sources.\n\n## Simple Example\n\n```js\nimport { jsonapi } from 'beedi';\n\nasync function app(event) {\n  // The handler just contains the logic.\n  // event.body has been json parsed.\n  return {\n    message: 'I get json stringified'\n  }\n}\n\nexport const handler = jsonapi(app);\n```\n\n## Why choose BeeDI\n\nIts super early days. BeeDI is not used in production anywhere and is just a fun hobby project. I would not recomend using this in production. If you want something with a similar style but more feature complete, better tested, and well maintained check out https://middy.js.org/ and https://laconiajs.io/.\n\nWith that disclamer out the way beedi does have some upsides.\n\n* It's really lightweight. (1kb unminified)\n* It has no external dependencies.\n* The interface is really simple. Each helper takes an object that contains just a couple of parameters.\n* No legacy bagage. No support for callbacks. This means less work to maintain it and it is much lighter. This also could be considered a bad thing. 🤷‍♂️\n* The internal code is very low abstraction and very simple. Take a peek under the hood. There really is very little magic to make this happen.\n\nIf you give it a try let me know by leaving a star\n\n## Table of Contents\n  * [Simple Example](#simple-example)\n  * [Why choose BeeDI](#why-choose-beedi)\n  * [Table of Contents](#table-of-contents)\n  * [Installation](#installation)\n  * [Examples](#examples)\n  * [Testing](#testing)\n  * [Contributions](#contributions)\n\n## Installation\n\n## Examples\n\n### Dependency Injection\n\n```js\nimport { jsonapi } from 'beedi';\nimport { pg } from 'pg-sql';\n\nexport async function app(event, { pg }) {\n  // The handler just contains the logic.\n  // event.body has been json parsed.\n  await pg.sql('INSERT blah...');\n  return {\n    message: 'I get json stringified'\n  }\n}\n\nexport const handler = jsonapi(app, { dependencies: () =\u003e ({ pg }));\n```\n\n\n\n## Testing\n\n## Contributions\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankcorn%2Fbeedi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankcorn%2Fbeedi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankcorn%2Fbeedi/lists"}