electrolyte icon indicating copy to clipboard operation
electrolyte copied to clipboard

add singleton as source helper

Open piercus opened this issue 7 years ago • 1 comments

Hello,

Following remarks in https://github.com/jaredhanson/electrolyte/issues/35, https://github.com/jaredhanson/electrolyte/pull/27 and https://github.com/jaredhanson/electrolyte/issues/35 i was not finding a good way to inject singletons manually.

I'd like to have this design

IoC.use(IoC.singleton('settings', {foo : 'bar'}));

Hope it will help someone

piercus avatar Jan 12 '18 15:01 piercus

Coverage Status

Coverage decreased (-1.6%) to 91.93% when pulling 799b0617244db4df78678362d641f4fce78570d1 on piercus:sources-singleton into d6af75b444e8c46bd62c2eb2b708b73af3145e62 on jaredhanson:master.

coveralls avatar Jan 12 '18 15:01 coveralls