Skip to content

Commit

Permalink
chapter 04: separating the virtual interfaces I created, that allows …
Browse files Browse the repository at this point in the history
…one client use only what need, set, get or both :)
  • Loading branch information
devcorpio committed Mar 31, 2019
1 parent 4ce1081 commit e8d3c8f
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/**
*
* interface MutableServiceContainerInterface {
* function set(name, fn);
* }
*
* interface ServiceLocatorInterface {
* function get(name);
* }
*
* Quack Quack Quack 🦆 typing :D
*/

function serviceContainer() {
function get(name) {
// something here...
}

function set(name, fn) {
// something here
}

return {
get,
set,
};
}

module.exports = serviceContainer;

0 comments on commit e8d3c8f

Please sign in to comment.