henriquecustodia / Anakin
Licence: mit
This Node module maps all application's dependencies and centralizes everything, at only one place
Programming Languages
javascript
184084 projects - #8 most used programming language
es6
455 projects
Projects that are alternatives of or similar to Anakin
Kimera Vio
Visual Inertial Odometry with SLAM capabilities and 3D Mesh generation.
Stars: ✭ 741 (+9162.5%)
Mutual labels: mapping
Di
Dependency Injection and IoC framework for PHP
Stars: ✭ 5 (-37.5%)
Mutual labels: dependency-injection
Koa Typeorm Starter
Starter project for using koa with TS and TypeORM
Stars: ✭ 23 (+187.5%)
Mutual labels: dependency-injection
Shiftscheduler
A boilerplate ASP.NET Core project, including a sample employee shift scheduler app
Stars: ✭ 5 (-37.5%)
Mutual labels: dependency-injection
Mappinggenerator
🔄 "AutoMapper" like, Roslyn based, code fix provider that allows to generate mapping code in design time.
Stars: ✭ 831 (+10287.5%)
Mutual labels: mapping
Koin
Koin - a pragmatic lightweight dependency injection framework for Kotlin
Stars: ✭ 7,142 (+89175%)
Mutual labels: dependency-injection
Grpc
A proof of concept for a way to implement gRPC services in a code first way using C# and .NET Core.
Stars: ✭ 17 (+112.5%)
Mutual labels: dependency-injection
Inject.dart
Compile-time dependency injection for Dart and Flutter
Stars: ✭ 833 (+10312.5%)
Mutual labels: dependency-injection
Codablealamofire
An extension for Alamofire that converts JSON data into Decodable objects.
Stars: ✭ 744 (+9200%)
Mutual labels: mapping
Kodein Mvvm
Example app using Kodein for dependency injection with MVVM and Architecture Components
Stars: ✭ 26 (+225%)
Mutual labels: dependency-injection
Opulence
A simple, secure, and scalable PHP application framework
Stars: ✭ 723 (+8937.5%)
Mutual labels: dependency-injection
Marvelheroes
❤️ A sample Marvel heroes application based on MVVM (ViewModel, Coroutines, LiveData, Room, Repository, Koin) architecture.
Stars: ✭ 826 (+10225%)
Mutual labels: dependency-injection
Lld Parking Lot
Repository for low level design solution of parking lot
Stars: ✭ 27 (+237.5%)
Mutual labels: dependency-injection
Swiftresolver
Dependency injection framework for Swift
Stars: ✭ 26 (+225%)
Mutual labels: dependency-injection
Inherited builder
🤖Autogenerated state management and dependency injection with inherited widgets
Stars: ✭ 17 (+112.5%)
Mutual labels: dependency-injection
Anakin
This node module maps all application's dependencies and centralizes everything, at only one place.
Usage
This example shows how to use Anakin easily 😄
How to install
npm install --save anakin
Quick start
//module/to/get/ module.js
module.exports = `I'm here`;
//app.js
let anakin = require('anakin')({
base: __dirname
});
anakin.map({
something: 'module/to/get/module.js'
});
let something = anakin.get('something');
console.info(something); //I'm here`
API
-
anakin
: (configuration: Object): Object
This function it useful to configurate how to anakin should to work. It returns an Anakin Object, useful to manage application's dependencies.
let anakinObject = require('anakin')({
base: { String } // [REQUIRED] This attribute shows to anakin where is the bootstrap file. It receives only path as String. Recommended to use the __dirname value.
singleton: { Boolean } // When it is truthy, Anakin will keep the dependencies on memory. Otherwise, the dependencies will just be a require cache.
});
Anakin Object
-
map
(mapperObj: Object): void
This method maps all dependencies. The dependecy path does not need has a file extension (e.g .js or .json) because this method uses the
require
method internally.
anakin.map({
dependencyName: 'module/to/get/module.js'
});
-
get
(module: String): any
This method get a dependency was set in mapper object.
anakin.get('someDependency');
Pull requests are very welcome!
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].