syrup
Syrup is an extremely simple Promise-based Dependency Injection framework (or rather, a library) for Node.js. While many related efforts already exist, Syrup attempts to break the mold by focusing on a single feature (dependency resolution) and relying on Node.js for the rest.
Features
- Configuration-free. No need to set up configuration files just to get up and running.
- Magic-free module loader. It's just
require()
and you'll be the one calling it (i.e. you have full control). - Promise-only.
- Mock-friendly. Invoke modules with mock dependencies for easy testing.
- Non-intrusive. You can use Syrup in just one part of your app.
- Runs in parallel with an optional serial mode.
Mockability
Much like in Architect, you can invoke modules directly by passing your own mock dependencies to them.
archive.js
var syrup = moduleexports =
archive-test.js
var sinon = var chai = chaiuse vat expect = chaiexpect var archive =
Contributing
See CONTRIBUTING.md.
License
See LICENSE.
Copyright © CyberAgent, Inc. All Rights Reserved.