Venom
Simple way to add DI to your javascript projects.
Installation
Node.js, on project path:
npm install venom
Browser:
- Donwload venon.min.js and include it in
script
tag.
Examples
Node projects:
var venom = ; // Dependency to injectvar ElectricEngine = { return 'Fisiuu!!'; }; // Constructor { thisengine = ElectricEngine;} Carprototype { return thisenginestart;}; venom;var car = venom; console; // Fisiuu!!
Browser:
<script type="text/javascript" src="venom.min.js"></script><script type="text/javascript"> // Dependency to inject var ElectricEngine = { return 'Fisiuu!!'; } ; // Constructor { thisengine = ElectricEngine; } Carprototype { return thisenginestart; }; venom; var car = venom; ; // Fisiuu!!</script>
To view a full guide, take a look: guide.md
Contributions
Do you want to contribute?. Please, follow the below suggestions:
- To add features,
pull requests
todevelop
branch. - To fix bugs in release version,
pull request
bothmaster
anddevelop
branches. - Be consistent with style and design decisions.
- Cover your implementation with tests, add it under
test/*-test.js
.
Change history
To view change history, please visit: history.md
Versioning strategy:
- The major version will increase for any backward-incompatible changes.
- The minor version will increase for added features.
- The patch version will increase for bug-fixes.
License
To view the MIT license, please visit: The MIT License (MIT)