dkleehammer / carbon Goto Github PK
View Code? Open in Web Editor NEWAn extendible lightweight, unopinionated, module dependency injection library.
An extendible lightweight, unopinionated, module dependency injection library.
Currently we store the other module injections into the current module.
Storing other module injections in the current module create a duplication of storage, but also makes the overall library larger. We could just recognize the usage of a pre-pended module ('Module1.injection') name on the injection name to find the module that contains the injection.
What do you think @halkon
carbon.module is creating a new instance every time it's called, this needs to look into the instance cache to see if it already exists as well as recognizing additional parameters passed in. If there is only a name passed in, we should check the cache, if there is other parameters passed in, we should create/replace any instance that already exists for it.
Package should be simplified to give a module back that is a singleton or a factory. This will make the package much smaller, but provide the same functionality as the original carbon that I planned.
Reasons for change:
Right now module.service could return a service or a factory since module.service('Test') is stored in the providers list as 'Test'
At this time, a developer could try to create a module, service, or factory that already exists and end up with the object that's in the provider store. We need to throw an error on redefinition since the developer should also not be able to replace a service that is already created.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.