https://github.com/eibens/dein
Functional-style dependency injection with minimal TypeScript syntax. Built for Deno.
https://github.com/eibens/dein
deno dependency-injection functional hooks logging minimal typescript
Last synced: 3 months ago
JSON representation
Functional-style dependency injection with minimal TypeScript syntax. Built for Deno.
- Host: GitHub
- URL: https://github.com/eibens/dein
- Owner: eibens
- License: mit
- Created: 2021-08-18T19:20:13.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-08-24T18:10:59.000Z (almost 4 years ago)
- Last Synced: 2025-02-24T01:51:47.746Z (4 months ago)
- Topics: deno, dependency-injection, functional, hooks, logging, minimal, typescript
- Language: TypeScript
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dein
[dein] defines **de**pendency **in**jection in a functional way and with minimal
syntax. It is implemented in TypeScript for Deno.[![License][license-shield]](LICENSE)
[![Deno module][deno-land-shield]][deno-land]
[![Github
tag][github-shield]][github] [![Build][build-shield]][build]
[![Code
coverage][coverage-shield]][coverage]# Usage
Get started by studying the "Egg Maker" example defined in
[example.ts](example.ts) and its output:```sh
deno run https://deno.land/x/dein/example.ts
```Documentation is still work in progress. Fortunately, the source code is rather
minimal:- [inject.ts](inject.ts) for creating new systems.
- [hooks.ts](hooks.ts) for defining overrides.
- [chain.ts](chain.ts) for combining overrides.
- [mod.ts](mod.ts) exports all above.# Contributing
Run [dev.ts](dev.ts) to build the source files locally:
```ts
deno run -A dev.ts
```[dein]: #
[github]: https://github.com/eibens/dein
[github-shield]: https://img.shields.io/github/v/tag/eibens/dein?label&logo=github
[coverage-shield]: https://img.shields.io/codecov/c/github/eibens/dein?logo=codecov&label
[license-shield]: https://img.shields.io/github/license/eibens/dein?color=informational
[coverage]: https://codecov.io/gh/eibens/dein
[build]: https://github.com/eibens/dein/actions/workflows/ci.yml
[build-shield]: https://img.shields.io/github/workflow/status/eibens/dein/ci?logo=github&label
[deno-land]: https://deno.land/x/dein
[deno-land-shield]: https://img.shields.io/badge/x/dein-informational?logo=deno&label