Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including coffee-sweetener with all npm packages installed. Try it out:

var coffeeSweetener = require("coffee-sweetener")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

coffee-sweetener v0.0.3

Small utility component that you can use in your applications to ease the management of dependencies between objects. The idea is simple, you have a factory object (we'll call this the *injector*) where you define some mappings. Each mapping has a unique id that you define. From different modules you can query the *injector* to give you a new instance of a specific mapping. Within classes you can define depenecies which will be satisfied on creation of a new instance of that class.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free