@sailplane/injector

Simple, light-weight, lazy-instantiating, and type-safe dependency injection in Typescript.

Usage no npm install needed!

<script type="module">
  import sailplaneInjector from 'https://cdn.skypack.dev/@sailplane/injector';
</script>

README

@sailplane/injector - Type-safe Dependency Injection

What?

Simple, light-weight, lazy-instantiating, and type-safe dependency injection in Typescript! Perfect for use in Lambdas and unit test friendly.

This is part of the sailplane library of utilities for AWS Serverless in Node.js.

Why?

It is built on top of the BottleJS, with a simple type-safe wrapper. The original bottle is available for more advanced use, though. Even if you are not using Typescript, you may still prefer this simplified interface over using BottleJS directly.

How?

See the doc site for usage and examples.

There's also a small working example of Injector in the example directory. It includes Serverless Framework, Webpack, and @sailplane/lambda-utils.