{"_id":"microdi-js","_rev":"27-a152751d81f8370cffb2f99807b129e6","name":"microdi-js","description":"A tiny DI container","dist-tags":{"latest":"1.1.0"},"versions":{"0.0.1":{"name":"microdi-js","version":"0.0.1","description":"A tiny DI container","main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.2.17","babel-core":"^5.4.3","babel-loader":"^5.1.0","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"4302aba8c36ac1329f9beabf93f32238cea71eb2","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.1","scripts":{},"_shasum":"b86a9d320b43e6680171f74ddf4bef532bfffda7","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"b86a9d320b43e6680171f74ddf4bef532bfffda7","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.1.tgz","integrity":"sha512-Bpq6g4f3ol2SaP0DTj7dWhW5iUlL/R+mOPBpfC+m62EUCQTyyr92IGCuA8W5GNDrNWM/mNpCrmOi+rmhIENZOg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFwD0OxPy5gbrPbYAJzOfVyZ6AJn8cYDRCf9L2Yco00TAiAzQ/nNoxCinYem6G08Iensut+CtG7sUBjRdvA4wvgFWQ=="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.3":{"name":"microdi-js","version":"0.0.3","description":"A tiny DI container","main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"6e1c2f2eba8779c3a5c519fea44ab49695db2854","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js#readme","_id":"microdi-js@0.0.3","scripts":{},"_shasum":"34f8b0eeebb63bdac9e002e933e50bcca0f82541","_from":".","_npmVersion":"2.11.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"34f8b0eeebb63bdac9e002e933e50bcca0f82541","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.3.tgz","integrity":"sha512-qgwqXkafXgFeJ0bE9beab7PC8vJYRyASzmaeZ0GiTRvdLce4ARU+Nbm2hemDgLRdCV8Q/F3jQv8TTufilPkbbQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD4zYsB9ksjI7B6th+2HgUYB0D8kViW6jV/i+x5jdqWvgIgY+IvfnZL7KEVLsPaWNz82bxm0Mq01jJdxJmfl6OjlL0="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.4":{"name":"microdi-js","version":"0.0.4","description":"A tiny DI container","main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"git+https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"2c51e31320e4eee80e90627572850f9e35ad27f7","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js#readme","_id":"microdi-js@0.0.4","scripts":{},"_shasum":"fed0228356c6d560736d30b605be9fb63836acab","_from":".","_npmVersion":"2.11.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"fed0228356c6d560736d30b605be9fb63836acab","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.4.tgz","integrity":"sha512-dPQjyukMcqmOtximQhvhRbx4P/8AUw7CUJlsbWk+lhgst6coq70lQX6VOF6DUDRVZ83a6TUDrAD6s5c7dxAnXA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFbDyEs5cpxPpS/RBSexbC6nNw/JMokvOCMVvfDouAwyAiEAlnMiwOx/Bq9WVUiha22kMQ2cbOHW57GjjEa+UieO1uY="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.6":{"name":"microdi-js","version":"0.0.6","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"69f574fb29dc3c630726bb62cacfd7eefad4e076","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.6","scripts":{},"_shasum":"e13056c29c697d59109f01da44e336fa46313858","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"e13056c29c697d59109f01da44e336fa46313858","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.6.tgz","integrity":"sha512-hu2jgLbe05Z+pRxY8fSOh3yDjsp4VVXuabdiZVL8pENJd/6mGI1we1AUAncrYhARAnAVJKBT5SjKCQ2AZYnZRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCwUrTFWwOfnQTis6UxdV2CEd8sWTMrB2IFAtTMX+jCtgIhAIZ6ewBrtWzu98wrtbyukkIFzReuyTXgVxAwuVAWNJ8B"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.7":{"name":"microdi-js","version":"0.0.7","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"a264a78d23e4af4d43e149941156fb1fc1c31345","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.7","scripts":{},"_shasum":"f997ca9589b758229a21c096ed3fbb8f2c6a1fed","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"f997ca9589b758229a21c096ed3fbb8f2c6a1fed","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.7.tgz","integrity":"sha512-s8qqrh+74Obn1DfV5p2o2HG1W4yFDiG0Y901EYpjTT4EZA4+kMwIFYI7FnheBAkcivRqL6q72fsBCXP/8jcoCg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnf7InoxUBadRBFKBbWhLm0zZwThiaOanxmfbdtQEUeAIhAKsGRXntf4CIQF9ie75UZQMTXE2iz69lMOKBQ2Yk8gbd"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.8":{"name":"microdi-js","version":"0.0.8","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"index.js","author":{"name":"Keith Woods"},"license":"ISC","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"92a36cb8656674f2f680023a51aa6463d66b0165","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.8","scripts":{},"_shasum":"2ba2df667d8362b470b7c6bf2f1cce5640223994","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"2ba2df667d8362b470b7c6bf2f1cce5640223994","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.8.tgz","integrity":"sha512-TpXZfMM5TwzxvA3XD30jDU2KgLTnTys6XaukjiQea3tv87pynMYjPnmD4Zviebh6H3DquVI82cd8T9XOBOkTPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHu4wndCWPdIApzsfUoTePCyH+45aCos9swPzPI9x3j0AiANaXlqXSwV87NRTA5erjfvV/08MTkydudUVohGL5AmJQ=="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.9":{"name":"microdi-js","version":"0.0.9","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"index.js","author":{"name":"Keith Woods"},"license":"Apache 2","repository":{"type":"git","url":"git+https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"e18e1b44f6c605f6a239491174e67e2e0045439b","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js#readme","_id":"microdi-js@0.0.9","scripts":{},"_shasum":"d4a839a3df6897cfaf9cad8e7f57a1825c278186","_from":".","_npmVersion":"2.11.1","_nodeVersion":"0.12.4","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"d4a839a3df6897cfaf9cad8e7f57a1825c278186","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.9.tgz","integrity":"sha512-+pT8y7iC1Ap4fuQv3uqZQhLXZ5olEVYTSJtHaiSZCz2lK/KCA52n/trFlTNYz/sh0ugdsZxU8OIwEPwOmdZ8cQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwAItfa2fCRUNXLTYxiJGiF3H0+/ku0wOoExQlFKnUGAIhAPOKhjmGu4h+EtkZMdjm/6Me8W//obTU+1lEfjp8I4gh"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.10":{"name":"microdi-js","version":"0.0.10","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"index.js","author":{"name":"Keith Woods"},"license":"Apache 2","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"87de9c8fcbe8a409ee38566da274f3ac407aa710","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.10","scripts":{},"_shasum":"c9769275583919d6d87bd1b84620b7f40305a3f4","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"c9769275583919d6d87bd1b84620b7f40305a3f4","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.10.tgz","integrity":"sha512-oWO4N1G2FJO46Qp8JmghAWrMW/wGOzJ/7vgm3qLXCNeEs0bQGFE86z1QbV2BPeIsxKKIXsA3cJx+7winAqQYiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+QzhyVznJOgS/2mDt4zNsojSrknSG3uWJpVZ63NWdGgIhANGnj/wgKz2AVHSZiAYN5Kk0pmOe0vXk/InrtPUXQwXf"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.0.12":{"name":"microdi-js","version":"0.0.12","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"main":"dist/microdi.js","author":{"name":"Keith Woods"},"license":"Apache 2","repository":{"type":"git","url":"https://github.com/sonic78/microdi-js.git"},"devDependencies":{"babel":"^5.4.7","babel-core":"^5.4.7","babel-loader":"^5.1.3","grunt":"^0.4.5","grunt-babel":"^5.0.0","grunt-banner":"^0.4.0","grunt-contrib-jshint":"^0.11.2","grunt-contrib-watch":"^0.6.1","grunt-karma":"^0.9.0","grunt-webpack":"^1.0.8","karma":"^0.12.28","karma-chrome-launcher":"^0.1.7","karma-jasmine":"^0.3.2","karma-webpack":"^1.3.1","load-grunt-tasks":"^1.0.0","source-map-loader":"^0.1.3","webpack":"^1.4.13","webpack-dev-server":"^1.6.6"},"gitHead":"a259801af8d5622ebfa7ae1a7f833df29aa69981","bugs":{"url":"https://github.com/sonic78/microdi-js/issues"},"homepage":"https://github.com/sonic78/microdi-js","_id":"microdi-js@0.0.12","scripts":{},"_shasum":"d5473b168c99a4d3c066afb72bfbe2d358c505aa","_from":".","_npmVersion":"2.4.1","_nodeVersion":"0.10.36","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"d5473b168c99a4d3c066afb72bfbe2d358c505aa","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.0.12.tgz","integrity":"sha512-gE5t8Up7j6HRaEan4jMuqZJUJAeGw0i9lhZkq5ENvdhksGA128ZsaK94aANpdY8tMy32rIZz8idVgoPMAxYKsw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1hG6F8UmtgEOIMOCxzD1pS8qJnDovKzJ+iw74yq2QuwIhAK+DRU7spYRaCW9kI1kLqyVhD0U1pyQJkfkR6UYFAsqI"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"directories":{}},"0.1.0":{"name":"microdi-js","version":"0.1.0","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"karma start","test:ci":"karma start --single-run","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-eslint":"5.0.0","babel-loader":"6.2.4","babel-plugin-transform-runtime":"6.6.0","babel-preset-es2015":"6.6.0","babel-preset-react":"6.5.0","eslint":"2.2.0","eslint-loader":"1.3.0","jasmine-core":"2.4.1","karma":"^0.13.19","karma-chrome-launcher":"^0.2.2","karma-jasmine":"^0.3.7","karma-spec-reporter":"0.0.23","karma-webpack":"^1.7.0","webpack":"1.12.14","webpack-dev-server":"1.14.1"},"gitHead":"73df8fb8a5cf0f0d4480802a58e2269d386e1a77","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@0.1.0","_shasum":"b877ce08302312afcf3c4c0023eb68cf4fbb9978","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.5.0","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"b877ce08302312afcf3c4c0023eb68cf4fbb9978","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.1.0.tgz","integrity":"sha512-YuVKLOlszYa4a9YQjp/l1z5zm+XHyjPHCHcXcHYGB9KJVRdkhEcUOZ5JDSxKnZOBi5I8FnKaTN68+Niz0foI8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAuPs0Iien/GDJUAJddCdIDARh7cXxHVEaMhZv1o6YOGAiEA0LipuioS5CsGcFswPhcUgXn8+dvptvX9EI3m1+IijxI="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/microdi-js-0.1.0.tgz_1461256942175_0.017924193758517504"},"directories":{}},"0.1.1":{"name":"microdi-js","version":"0.1.1","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"karma start","test:ci":"karma start --single-run","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-eslint":"5.0.0","babel-loader":"6.2.4","babel-plugin-transform-runtime":"6.6.0","babel-preset-es2015":"6.6.0","babel-preset-react":"6.5.0","eslint":"2.2.0","eslint-loader":"1.3.0","jasmine-core":"2.4.1","karma":"^0.13.19","karma-chrome-launcher":"^0.2.2","karma-jasmine":"^0.3.7","karma-spec-reporter":"0.0.23","karma-webpack":"^1.7.0","webpack":"1.12.14","webpack-dev-server":"1.14.1"},"gitHead":"73df8fb8a5cf0f0d4480802a58e2269d386e1a77","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@0.1.1","_shasum":"7ba0c37819c343e7713d51b9cdf4c2f5719087ec","_from":".","_npmVersion":"3.5.0","_nodeVersion":"5.1.0","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"7ba0c37819c343e7713d51b9cdf4c2f5719087ec","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.1.1.tgz","integrity":"sha512-Sh+JtEj811JTIMHc61NVLlPxXNQUuvnIG3tsKYcwn+0gcIK1Rf+zMt41vjz/DIRSWpYLgVxzvuPKwE3yit310w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCz5xlY/sII0runUTBkaHY222Cp6u9/Mktxs32SweF3NgIhAP/n3GQnI2RQ4V/IIvNf9rfnqm7gP1EpNaUCICFpESat"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/microdi-js-0.1.1.tgz_1461336699189_0.8767955221701413"},"directories":{}},"0.1.2":{"name":"microdi-js","version":"0.1.2","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"karma start","test:ci":"karma start --single-run","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-eslint":"5.0.0","babel-loader":"6.2.4","babel-plugin-transform-runtime":"6.6.0","babel-preset-es2015":"6.6.0","babel-preset-react":"6.5.0","eslint":"2.2.0","eslint-loader":"1.3.0","jasmine-core":"2.4.1","karma":"^0.13.19","karma-chrome-launcher":"^0.2.2","karma-jasmine":"^0.3.7","karma-spec-reporter":"0.0.23","karma-webpack":"^1.7.0","webpack":"1.12.14","webpack-dev-server":"1.14.1"},"gitHead":"7ef3374cf53d73e39389e01f81de0eaaf0811013","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@0.1.2","_shasum":"05047dd8955713334b48f6e32ba44bf5dfe276a8","_from":".","_npmVersion":"3.5.0","_nodeVersion":"5.1.0","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"05047dd8955713334b48f6e32ba44bf5dfe276a8","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.1.2.tgz","integrity":"sha512-jiMVg9x+2qAHoZFj9hwnCrLTcY0jL7dErCcVxt+tFBAUQykCY7s7SfydH6JWj4n3T9oBdvKz7Hm/tyQ9rEDktg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGrHRI0VIdcMt+dMcTadeciFIY3Wzufnalgl7wXAwoGRAiB+UnPjj0cCIuyKOaMxAOrrzE1B6IktAlCshE8yHYvlNw=="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/microdi-js-0.1.2.tgz_1461337821883_0.7274727434851229"},"directories":{}},"0.1.3":{"name":"microdi-js","version":"0.1.3","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"karma start","test:ci":"karma start --single-run","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-eslint":"5.0.0","babel-loader":"6.2.4","babel-plugin-transform-runtime":"6.6.0","babel-preset-es2015":"6.6.0","babel-preset-react":"6.5.0","eslint":"2.2.0","eslint-loader":"1.3.0","jasmine-core":"2.4.1","karma":"^0.13.19","karma-chrome-launcher":"^0.2.2","karma-jasmine":"^0.3.7","karma-spec-reporter":"0.0.23","karma-webpack":"^1.7.0","webpack":"1.12.14","webpack-dev-server":"1.14.1"},"gitHead":"2d505d33492e26142719ef57416c84012077e2ea","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@0.1.3","_shasum":"7bac19796fe1d0b24b09b3960eb67b11c4caa23f","_from":".","_npmVersion":"3.5.0","_nodeVersion":"5.1.0","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"7bac19796fe1d0b24b09b3960eb67b11c4caa23f","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.1.3.tgz","integrity":"sha512-mJ6x36s7W4SuSjy8S3RlFoh+DiC7IUBrbWFA27VBySbloc4vwn02dh7plrKX22qW7UDcKcoh2rOLa9Lh/PZAig==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCjKRS9q7DfxDcCQbb70F7l7KqgoaEhjr9N5nijIH7aUAIhAIZejNVbBsb45Aek7bfuKImwFtrtPgQaFhYowR1bMl2j"}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/microdi-js-0.1.3.tgz_1461768134274_0.863649166887626"},"directories":{}},"0.1.5":{"name":"microdi-js","version":"0.1.5","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"karma start","test:ci":"karma start --single-run","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-eslint":"5.0.0","babel-loader":"6.2.4","babel-plugin-transform-runtime":"6.6.0","babel-preset-es2015":"6.6.0","babel-preset-react":"6.5.0","eslint":"2.2.0","eslint-loader":"1.3.0","jasmine-core":"2.4.1","karma":"^0.13.19","karma-chrome-launcher":"^0.2.2","karma-jasmine":"^0.3.7","karma-spec-reporter":"0.0.23","karma-webpack":"^1.7.0","webpack":"1.12.14","webpack-dev-server":"1.14.1"},"gitHead":"5b1520c57dd2706d877b9b506a4edf0f49efe4ab","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@0.1.5","_shasum":"0f8ec0d344194723466a5e64e18f52601a342c88","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.5.0","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"0f8ec0d344194723466a5e64e18f52601a342c88","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-0.1.5.tgz","integrity":"sha512-V8KyZ4WiWUh7Y2F1vZvldn5E23zkq55PquXimQ3f4KMAF8Epwkdj0ElCbEW+jcVE9zp3w6QS3f8XLLSo8rd/+g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA8G4DrCqgn3oiCKrsvtRgCdg+7ExoE4HDX0oCvf7muVAiEAz66LsgRmhPxLftH98rLTCKw7W9p+HxPwEpKRovtlM9U="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/microdi-js-0.1.5.tgz_1463253161830_0.8781148993875831"},"directories":{}},"1.0.0":{"name":"microdi-js","version":"1.0.0","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"jest --watchAll --no-cache --config jest.config","test:ci":"jest --teamcity --config jest.config --verbose","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-jest":"^18.0.0","babel-loader":"6.2.10","babel-plugin-transform-runtime":"6.15.0","babel-preset-es2015":"6.18.0","babel-preset-react":"6.16.0","eslint":"3.12.2","eslint-loader":"^1.6.1","jasmine-core":"2.5.2","jest":"18.1.0","jest-teamcity-reporter":"0.3.0","webpack":"1.14.0","webpack-dev-server":"1.16.2"},"gitHead":"1c3570db033806fc58d027c9756224a908739052","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@1.0.0","_shasum":"d05ed5d806e3044f97512a6f6608ea32c3422b41","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.1","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"d05ed5d806e3044f97512a6f6608ea32c3422b41","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-1.0.0.tgz","integrity":"sha512-pX+jnesTiqTI7eKokb4Kfs6P7xEsPS/MqoUEtVWAUDiYavYMahXizTUwF3VUCj5BVbtKt9WmUA3/fEGqyhjoxg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFJU7VvBEgp2kIT4gUayv9qs/sWA7mNu6kQezyBTNa5YAiBYTQD5V4sm5OJ5LkrAKDD3EqOgn2RE2Yy2M+s0K9fwfQ=="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/microdi-js-1.0.0.tgz_1483980660848_0.5854764957912266"},"directories":{}},"1.0.1":{"name":"microdi-js","version":"1.0.1","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"jest --watchAll --no-cache --config jest.config","test:ci":"jest --teamcity --config jest.config --verbose","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-jest":"^18.0.0","babel-loader":"6.2.10","babel-plugin-transform-runtime":"6.15.0","babel-preset-es2015":"6.18.0","babel-preset-react":"6.16.0","eslint":"3.12.2","eslint-loader":"^1.6.1","jasmine-core":"2.5.2","jest":"18.1.0","jest-teamcity-reporter":"0.3.0","webpack":"1.14.0","webpack-dev-server":"1.16.2"},"gitHead":"07d5dbefbcc4143300a3883812d14fd2e4aeeb0e","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@1.0.1","_shasum":"58a8bf969448c6f820b17a9f4c6e2e65a80387d2","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.1","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"58a8bf969448c6f820b17a9f4c6e2e65a80387d2","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-1.0.1.tgz","integrity":"sha512-Q2xSN5AFFXtC7K6iZcir2krZ0FY/8naLQOhCLxKYMRPYRbDFQtTLRErzEL+FmvDc/jnk/r5L7Sg7YBFmu2+HjQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMPp8vcTRwYVqP2kcLB2o5TCQbstMqjDZPj8MoxCkjZAiA0B6EOGqrycnTPbxcDQjKucPyCGvwkkdAZyUBkqSicUw=="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/microdi-js-1.0.1.tgz_1484062381559_0.5577585005667061"},"directories":{}},"1.1.0":{"name":"microdi-js","version":"1.1.0","description":"A tiny DI container","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"scripts":{"start":"npm run test","test":"jest --watchAll --no-cache --config jest.config","test:ci":"jest --teamcity --config jest.config --verbose","build":"npm run build:dev && npm run build:prod","build:dev":"webpack --config webpack.dev.config.js","build:prod":"webpack -p --config webpack.prod.config.js"},"main":"dist/microdi.js","author":{"name":"Dev Shop Limited"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"typings":"./microdi-js.d.ts","devDependencies":{"babel-jest":"^18.0.0","babel-loader":"6.2.10","babel-plugin-transform-runtime":"6.15.0","babel-preset-es2015":"6.18.0","babel-preset-react":"6.16.0","eslint":"3.12.2","eslint-loader":"^1.6.1","jasmine-core":"2.5.2","jest":"18.1.0","jest-teamcity-reporter":"0.3.0","webpack":"1.14.0","webpack-dev-server":"1.16.2"},"gitHead":"6ed460ce079a7ba1326ccf030e63894db86359e9","bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","_id":"microdi-js@1.1.0","_shasum":"78b51a831e0153f2c632142016d9472c64a3acc1","_from":".","_npmVersion":"3.10.9","_nodeVersion":"6.9.1","_npmUser":{"name":"sonic78","email":"keithwoods@live.com"},"dist":{"shasum":"78b51a831e0153f2c632142016d9472c64a3acc1","tarball":"https://registry.npmjs.org/microdi-js/-/microdi-js-1.1.0.tgz","integrity":"sha512-2eS9sm5d0TxVh6WSO/HWFcZRUBfYLSQjPMljS9xMQ5gZTSsuuKDSo3xoduK7R/LV2NbC+TZq4XE3Wzey9pVkqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJJkX5ZXO66M0gynyyck+5iSIXdSh0/jFTX1dKP5eLVAiEAk8baiu2vNt1PG88qbVbeF3GBRWNGB8SEm53XxgVWv2g="}]},"maintainers":[{"name":"sonic78","email":"keithwoods@live.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/microdi-js-1.1.0.tgz_1485963337026_0.6489552732091397"},"directories":{}}},"readme":"[![Build Status](https://travis-ci.org/KeithWoods/microdi-js.svg?branch=master)](https://travis-ci.org/KeithWoods/microdi-js)\n[![npm](https://img.shields.io/npm/v/microdi-js.svg)](https://www.npmjs.com/package/microdi-js)\n\n**[Basic usage](#basic-usage)** |\n**[Concepts](#concepts)** |\n**[Features](#features)** \n\n# Microdi-js\n\nMicrodi-js is a tiny but feature rich dependency injection container for JavaScript.\n\n# Basic usage\n\n## Object Registration \nYou can register an object using one of three methods:\n\n* `container.register(identifier, Item)`.\n\n  This registers either a constructor function OR an object prototype `Item` using the given string `identifier`.\n\n  You can chain calls to alter the registration settings:\n  \n  ```javascript\n    var identifier = 'itemKey1';\n    container\n        .register('identifier', Item)\n        .inject('otherDependencyIdentifier1', 'otherDependencyIdentifier1')\n        .singletonPerContainer()\n        .inGroup('mySimilarObjects');\n  ```\n\n  Here we register `Item` using the string `identifier`. \n  We state that it requires [dependencies](#dependencies) `otherDependencyIdentifier1` and `otherDependencyIdentifier1`. \n  It's [lifetime management](#lifetime-management) is `singletonPerContainer`.\n  It can be resolved using the `identifier` or as part of the [group](#resolve-groups) `mySimilarObjects`. \n  \n* `container.registerInstance(identifier, objectInstance)`.\n\n  You can use `registerInstance` to register an existing instance with the given string `identifier`.\n    \n* `container.registerFactory(identifier, factory)`.\n\n  This registers a creation factory using the given string `identifier`. \n  The factory is a function that must return a new object instance. \n  The factory will receive the current container as a first parameter.\n  Any additional arguments passed during the `resolve` call will be passed to the factory.\n  \n  ```javascript\n    container\n        .registerFactory('fooId', (container, ...additionalDependencies) => {\n              let fooDependency = container.resolve('fooDependencyId');  \n              return new Foo(fooDependency, ...additionalDependencies);\n        })\n        .transient();\n    \n    let foo = container.resolve('fooId', 1, 2, 3);\n  ```\n  \n  Here we register a factory that will resolve a `Foo`. \n  We then resolve an instance (`foo`) passing some additional arguments. \n  Our creation factory resolves an additional dependency, then passes this dependency, plus the additional dependencies `1, 2, 3` to `Foo`s constructor and returns it.\n  It's registered using a transient scope so each time you resolve it, the factor will be invoked to resolve a new `Foo` instance. \n\n## Object Resolution\n\nObject resolution is done via :\n\n* `container.resolve(identifier [, additionalDependency1, additionalDependency2, etc. ]);`\n\n  This simply builds the object registered with the given `identifier`. \n  Any dependencies will also be built and injected.\n  Optionally provide additional dependencies which will get passed in after any that were specified via `inject()` at registration time.\n  \n* `container.resolveGroup(name);`\n\n   Resolving a [group](#resolve-groups) returns an array of objects registered against that group. \n \n## Example\n\nBelow we have 2 simple classes. \n`Parent` takes `Child` as it's dependency. \n`Child` is registered with the identifier 'child' and `Parent` with the identifier 'parent'.\nAdditionally the parent registration injects the `Child` as a [dependency](#dependencies).\n\n``` javascript\nclass Child {\n    sayHello() {\n        console.log('Hello from the child');\n    }\n}\nclass Parent {\n    constructor(child) {\n        this._child = child;\n    }\n    sayHello() {\n        console.log('Hello from the parent');\n        this._child.sayHello();\n    }\n}\nvar container = new microdi.Container();\ncontainer.register('child', Child);\ncontainer.register('parent', Parent).inject('child');\nvar parent = container.resolve('parent');\nparent.sayHello();\n```\n\nOutput:\n\n```\nkeith@devshop:~/dev/personal/microdi-js/dist/examples$ node readme.js\nHello from the parent\nHello from the child\n```\n\n# Concepts\n\n## Identifiers\n\nJavaScript doesn't have a type system which makes containers a little cumbersome to use. \nTypically in typed languages you'd utilise information provided by the type system to aid in dependency resolution and injection.\nHowever without such a system all is not lost, we can simply use strings (i.e. 'identifiers') to identify objects to construct.\n\n## Dependencies\nWe need to manually specify objects dependencies at registration time. \nThis is because there are no means available to inspect arguments required for `constructors` or `init` methods at object instantiation/initialisation time.\nWe specify dependencies via `inject`:\n\n```javascript\ncontainer.register('a', A)\n         .inject(dependency1, dependency2, etc.);`\n```\n\nEach item passed to `inject` represents a dependency to be injected into the instance that will be build.\nDuring `resolve` dependencies will be passed to the new instance in the same order they were provided to `inject`.\nThe arguments to `inject` can contain string `identifiers` referencing other registrations and/or `resolverKey`s.\nA `resolverKey` references a [dependency resolver](#dependency-resolvers) which adds functionality to how the container will acquire and build the dependency.\n\nLets look at an example:\n\n```javascript\nclass Controller { \n    constructor(a, factoryThatMakesB) {}\n}\ncontainer.register('a', A);\ncontainer.register('b', B);\ncontainer\n    .register('controller', Controller)\n    .inject('a', { resolver: 'factory', key : 'b' });\n```\n\nThe above registers a `Controller` using the identifier `controller`.\nIt specifies `Controller` requires 2 dependencies:\n\n* The dependency registered as `a`.\n* The dependency `{ resolver: 'factory', key : 'b' }`, this is a `resolverKey` telling the container to build the dependency `b` using the build in [injection factory](#injection-factories) resolver.\n\n# Features\n\n## Object creation & dependency injection\n\nA call to `resolve` will trigger build up of the object in question. \nAny [dependencies](#dependencies) the object requires will be resolved and injected.\n\n### Function constructors\n\nIf the type registered is a constructor function (i.e. typeof registeredObject === 'function') it will be initialised accordingly and any [dependencies](#dependencies) passed in.\n\n### Prototypical inheritance\n\nIf the type registered is not a constructor function it will be assumed a prototype.\nAt resolve time new object/s will be created using Object.create(registeredObject).\nIf the object has an `init` method then this will be called passing any [dependencies](#dependencies).\n\n## Lifetime management\n\nAn object’s lifetime can be controlled by the container in a number of ways.\n\n### Singleton\n\nA singleton registration specifies the container will hold onto the object instance.\nMultiple calls to `resolve` with the same key will yield the same instance.\nWhen the container is disposed, the container will, for any registered instances with a `dispose` function, invoke that function.\n\n\n```javascript\nvar Foo = {};\ncontainer.register('theFoo', Foo).singleton();\nvar foo1 = container.resolve('theFoo');\nvar foo2 = container.resolve('theFoo');\nconsole.log(foo1 == foo2); // true\n```\n\nNote this is the default lifetime used and so the call to `.singleton()` is optional.\n\n### Singleton per container\n\nThis is similar to a singleton however you get a single instance per child container.\n\n```javascript\nvar Bar = {};\ncontainer.register('theBar', Bar).singletonPerContainer();\nvar bar1 = container.resolve('theBar');\nvar bar2 = container.resolve('theBar');\nvar childContainer = container.createChildContainer();\nvar bar3 = childContainer.resolve('theBar');\nvar bar4 = childContainer.resolve('theBar');\nconsole.log(bar1 == bar2); // true\nconsole.log(bar2 == bar3); // false\nconsole.log(bar3 == bar4); // true\n```\n\n### Transient\n\nThis creates a new instance each time a call to `resolve(identifier)` or `resolveGroup(groupName)` is made.\nThe container will not hold a reference to the instances created.\n\n```javascript\nvar Baz = {};\ncontainer.register('theBaz', Baz).transient();\nvar baz1 = container.resolve('theBaz');\nvar baz2 = container.resolve('theBaz');\nconsole.log(baz1 == baz2); // false\n```\n\n### External\n\nLike a singleton however the container won't dispose the object when it's disposed.\n\n```javascript\nvar Disposable = {\n    init() {\n        this.isDisposed = false;\n        return this;\n    },\n    dispose() {\n        this.isDisposed = true;\n    }\n};\n// Note registerInstance internally sets the lifetime type as 'external', \n// You can pass false as the last argument if you want to change this. \n// The container will then manage it as 'singleton' and dispose the instance at disposal time \ncontainer.registerInstance('disposable1', Object.create(Disposable).init());\ncontainer.register('disposable2', Disposable);\nvar disposable1 = container.resolve('disposable1');\nvar disposable2 = container.resolve('disposable2');\ncontainer.dispose();\nconsole.log(disposable1.isDisposed); // false\nconsole.log(disposable2.isDisposed); // true\n```\n\n## Resolve groups\n\nYou can group objects together at registration time then resolve them using `resolveGroup(name)`.\nTypically this is handy when you're objects share a related abstraction.\n\n```javascript\nvar Foo = {\n    name: \"theFoo\"\n};\nvar Bar = {\n    name: \"theBar\"\n};\nvar container = new microdi.Container();\ncontainer.register('foo', Foo).inGroup('group1');\ncontainer.register('bar', Bar).inGroup('group1');\nvar group1 = container.resolveGroup('group1');\nfor (let i = 0, len = group1.length; i < len; i++) {\n    console.log(group1[i].name);\n}\n```\n\nOutput:\n\n```\ntheFoo\ntheBar\n```\n\n### Injecting groups\n\nIf you want to inject a group simply register the injection using the `groupName`.\nFrom example, if you wanted to inject all dependencies in group `group1`, from our example above, you'd do this:\n\n```javascript\nclass Bazz {\n    constructor(group1) {\n        // group1 would be an array with dependencies 'foo' and 'bar'\n        this._group1 = group1;\n    }\n};\ncontainer.register('bazz', Bazz).inject('group1');\nvar bazz = container.resolveGroup('bazz');\n```\n\n## Resolution with additional dependencies\n\nWhen calling `resolve` you can optionally pass additional [dependencies](#dependencies).\nThese will be appended to the dependencies provided to `inject` at registration time (if any).\n\n```javascript\nclass Foo {\n    constructor(fizz, bar, bazz) {\n        console.log('%s %s %s', fizz.name, bar.name, bazz.name);\n    }\n}\nvar container = new microdi.Container();\ncontainer.register('fizz', { name: 'fizz'});\ncontainer.register('foo', Foo).inject('fizz');\nvar foo = container.resolve('foo', { name: 'bar'}, { name: 'bazz'});\n```\n\nOutput\n\n```\nfizz bar bazz\n```\n\n## Injection factories\n\nSometimes you want your object to receive a factory, that when called will `resolve` and return the dependency in question.\n\n```javascript\nclass Item {\n    constructor() {\n        console.log(\"creating an item\");\n    }\n}\nclass Manager{\n    constructor(itemFactory) {\n        this._itemFactory = itemFactory;\n    }\n    createItem(name) {\n        return this._itemFactory(name);\n    }\n}\nvar container = new microdi.Container();\ncontainer.register('item', Item).transient();\ncontainer.register('manager', Manager).inject({ resolver: 'factory', key: 'item'});\nvar manager = container.resolve('manager');\nvar item1 = manager.createItem();\nvar item2 = manager.createItem();\n```\n\noutput:\n\n```\ncreating an item\ncreating an item\n\n```\n\n> **Note**\n>\n> Injected factories are different from factories you use to create objects (via `container.registerFactory`). \n> A factory registered via `registerFactory` is simply used to create your instance. \n> An injected factory lets the container create the instance but it wraps this creation in a factory and injects the factory. \n> It's typically used for lazy resolution of objects or when an object needs to create many other objects but doesn't want to take a dependency on the container itself. \n\n### Additional dependencies in factories\n\nYou can pass arguments to the factory and they forwarded as discussed [above](#resolution-with-additional-dependencies).\n\nLets modify the sample from above to demonstrate this:\n\n```javascript\nclass Item {\n    constructor(otherDependencyA, name) {\n        console.log('Hello ' + name + '. Other dependency: ' + otherDependencyA);\n    }\n}\nclass Manager{\n    constructor(itemFactory) {\n        this._itemFactory = itemFactory;\n    }\n    createItem(name) {\n        return this._itemFactory(name);\n    }\n}\nvar container = new microdi.Container();\ncontainer.registerInstance('otherDependencyA', 'look! a string dependency');\ncontainer.register('item', Item).inject('otherDependencyA').transient();\ncontainer.register('manager', Manager).inject({ resolver: 'factory', key: 'item'});\nvar manager = container.resolve('manager');\nvar fooItem = manager.createItem('Foo');\nvar barItem = manager.createItem('Bar');\n```\n\noutput:\n\n```\nHello Bob\nHello Mick\n```\n\n## Child containers\n\nChild containers can be used to manage and scope a set of related objects.\nThey inherit configuration from the parent however can be re-configured.\nThey also inherit instances from their parent depending upon the lifetime management of the objects in question. \n\nCreate a child container by calling `createChildContainer` on a parent;\n```javascript\nvar container = new microdi.Container();\nvar childcontainer = container.createChildContainer();\n```\n\n### Lifetime management in child containers\n\nDepending upon registration configurations, objects resolved from a child container will either be owned by the child container or the parent.\n\n```javascript\nvar Foo = { };\nvar container = new microdi.Container();\nvar childContainer = container.createChildContainer();\ncontainer.register('foo', Foo); // defaults to singleton registration\nvar foo1 = container.resolve('foo');\nvar foo2 = childContainer.resolve('foo');\nconsole.log(foo1 == foo2); // true, same instance\n\ncontainer.register('fooAgain', Foo).singletonPerContainer();\nvar foo3 = container.resolve('fooAgain');\nvar foo4 = childContainer.resolve('fooAgain');\nconsole.log(foo3 == foo4); // false, different instance\nvar foo5 = childContainer.resolve('fooAgain');\nconsole.log(foo4 == foo5); // true, same instance\n```\n\n### Overriding Registrations\n\nThe configuration of a child container can be overridden if required.\n\n```javascript\nvar Foo = { };\nvar container = new microdi.Container();\ncontainer.register('foo', Foo); // defaults to singleton registration\n\nvar childcontainer = container.createChildContainer();\nchildcontainer.register('foo', Foo).transient();\n\nvar foo1 = container.resolve('foo');\nvar foo2 = container.resolve('foo');\nconsole.log(foo1 == foo2); // true, same instance\n\nvar foo3 = childcontainer.resolve('foo');\nconsole.log(foo2 == foo3); // false, different instance\n\nvar foo4 = childcontainer.resolve('foo');\nconsole.log(foo3 == foo4); // false, different instance\n```\n\nOutput:\n\n```\ntrue\nfalse\nfalse\n```\n\n## Resolving the container\n\nSometimes you have an object that requires the container to be injected. \nWhile often thought of as an anti pattern, there are scenarios where this makes sense. \nIf the object is a 'bootstrapper' of sorts, i.e. it needs fine grained control over child containers and sub object graph resolution, injecting a container makes sense. \n  \nWhen there are child containers at play, you'd expect objects who require a container, to be provide with the same container that build them, i.e. the child container in question. \n \nLets look at an example:\n\n```javascript\n// a class that takes a container as a dependency\nclass Bootstrapper {\n    constructor(container) {\n        this._container = container; \n    }\n}\n```\n\nLets look at the manual way of doing this:\n\n```javascript\nimport { Container } from 'microdi-js'; \nvar container = new Container();\ncontainer.registerInstance('theRootContainer', container);\ncontainer.register('bootstrapper', Bootstrapper).inject('theRootContainer');\n// bootstrapper will get injected with instance `container`\nlet bootstrapper = container.resolve('bootstrapper');\n```\n\nThis will work, but when there are child container at play it gets a bit messy as you have to register things manually each time a child is created.\nTypically you strive to keep child container re-configuration to a minimum for code maintainability reasons. \n\nmicrodi supports a special injection key exposed as `MicroDiConsts.owningContainer`.\nThis key will ensure an object getting resolved get it's owning container.\nLets re-work the above example:\n\n```javascript\nimport { Container, MicroDiConsts } from 'microdi-js'; \nvar container = new Container();\ncontainer\n    .register('bootstrapper', Bootstrapper)\n    .inject(MicroDiConsts.owningContainer);\n// bootstrapper will get injected with instance `container`\nlet bootstrapper = container.resolve('bootstrapper');\n```\n\nObjects injected with `MicroDiConsts.owningContainer` and resolved from child containers will get the owning child container injected: \n\n```javascript\nimport { Container, MicroDiConsts } from 'microdi-js'; \nvar container1 = new Container();\ncontainer1\n    .register('bootstrapper', Bootstrapper)\n    .transient() // resolve new `Bootstrapper` instance each time\n    .inject(MicroDiConsts.owningContainer);\n\n// bootstrapper1 will get injected with `container1`\nlet bootstrapper1 = container1.resolve('bootstrapper');\n\n// bootstrapper2 will get injected with `container2`\nlet container2 = container1.createChildContainer();\nlet bootstrapper2 = container2.resolve('bootstrapper');\n```\n\n## Checking what's registered\n\nYou can check if a dependency is registered using `.isRegistered(name)`.\nA group can be checked using `.isGroupRegistered(groupName):boolean`.\nBoth these exist on a `container` object and will return a boolean result. \n\n## Disposal\n\nWhen you call `.dispose()` on a container, that container will inspect any object it holds and if an object has a `dispose` function, it will be called.\nHowever it will not dispose transient-created objects or objects registered via `registerInstance('aKey', myInstance)`.\nAny child containers created from the disposed parent will also be disposed.  These child containers will in turn dispose of their registered instances.\n\n```javascript\nclass Foo {\n    dispose() {\n        console.log('foo disposed');\n    }\n}\n\nvar container = new microdi.Container();\n\ncontainer.register('foo', Foo).singletonPerContainer();\nvar foo1 = container.resolve('foo');\n\nvar childcontainer = container.createChildContainer();\nvar foo2 = childcontainer.resolve('foo');\n\ncontainer.dispose();\n```\n\nOutput:\n\n```\nfoo disposed\nfoo disposed\n```\n\n## Dependency Resolvers\n\nDependency resolvers alters the default way a dependency is created.\nA dependency resolver is simply an object with a `resolve(container, resolverKey)` method.\nYou can create your own resolvers and add them to the container.\nWhen registering an object, a `resolverKey` can be used as a [dependency](#dependencies).\nThis enables the container to resolve the dependency using the resolver specified.\nA `resolverKey` can can also be specified as a replacement for the object or construction function that is to be built.\nAt resolve time the container will call the dependency resolver specified by the `resolverKey` to create the object in question.\nThe `container` and the `resolverKey` specified via `inject()` will be passed to the resolvers `resolve` method.\nThis sounds a bit more complicated than it actually is, it's easier to demonstrate with some code.\n\nHere is an example where rather than registering a concrete object to build, a `resolverKey` is used.\nThe `DomResolver` resolver will be used to resolve the object.\n\n```javascript\nclass DomResolver {\n    resolve(container, resolverKey) {\n        // return a pretend dom element,\n        return {\n            get description() {\n                return 'Fake DOM element - ' + resolverKey.domId ;\n            }\n        };\n    }\n}\nvar container = new microdi.Container();\ncontainer.addResolver('domResolver', new DomResolver());\n// Note the usage of 'isResolverKey' so the container can distinguish this from a normal object.\n// This is only required when you don't register a constructor function or prototype.\ncontainer.register('view', { resolver: 'domResolver', domId : 'theDomId', isResolverKey: true });\nvar view = container.resolve('view');\nconsole.log(view.description);\n```\n\nOutput:\n\n```\nFake DOM element - theDomId\n\n```\n\nHere is an example where a concrete object is registered and a resolverKey is used to resolve a dependency of the registered item.\n\n```javascript\nclass DomResolver {\n    resolve(container, resolverKey) {\n        // return a pretend dom element,\n        return {\n            get description() {\n                return 'Fake DOM element - ' + resolverKey.domId ;\n            }\n        };\n    }\n}\nvar container = new microdi.Container();\ncontainer.addResolver('domResolver', new DomResolver());\nclass Controller {\n    constructor(view) {\n        console.log(view.description);\n    }\n}\n// Note we don't need to specify the 'isResolverKey' property on the resolverKey.\n// The container assumes it is as it appears in the dependency list.\ncontainer.register('controller', Controller).inject({ resolver: 'domResolver', domId : 'viewId' });\nvar controller = container.resolve('controller');\n```\n\nOutput:\n\n```\nFake DOM element - viewId\n```\n\n### Built in resolvers\nThere are 3 built in resolvers.\n\n#### Delegate\n\nThe `delegate` resolver simply defers object creation to a delegate provided by the `resolverKey`.\n\n```javascript\nclass Foo  {\n    constructor(bar) {\n        console.log('bar is : [%s]', bar);\n    }\n}\nvar container = new microdi.Container();\ncontainer.register('foo', Foo)\n    .inject(\n    {\n        resolver: 'delegate',\n        resolve: (container, resolveKey) => {\n            return 'barInstance';\n        }\n    });\nvar foo = container.resolve('foo');\n```\n\nOutput:\n\n```\nbar is : [barInstance]\n```\n\n#### Injection factory\n\nDiscussed [above](#injection-factories), injection factories use the `factory` dependency resolver to wrap the creation call in a function for later invocation.\n\n#### External factory\n\nUnder the covers `registerFactory` uses a built in `externalFactory` dependency resolver to invoke the factory registered against an identifier.\n\n## Annotation usages and IoC\n\nOften container implementation use [decorators](https://github.com/wycats/javascript-decorators/blob/caf8f28b665333dc39293d5319fe01f01e3e3c0f/README.md) (annotations in Java and attributes in C#) to decorate objects with IoC related concerns. \nFor example lifetime management, scoping, dependency information etc.\nThe author believes this to be useful in some instances however often an anti-pattern for the following reasons:\n* Objects become dependent on their dependencies as they are explicitly declared together.\n* It becomes difficult to configure an object for differing usages unless you decorate it for both, if supported.\n* It becomes difficult to gain an understanding of how objects play together at runtime.\n  Runtime configuration is scattered on objects in different code files and across the entire codebase.\n  Runtime configuration of objects is simpler to understand when it's in a single place.\n* 90% of the time you'll find you need some runtime configuration. \n  You end up in a place where you have both runtime and declarative (i.e. decorator) configuration.\n  This adds confusion.\n* It doesn't work when creating shared code, i.e. in libraries. \n  If you hit this you don't want some code using annotation and some using run time configuration (i.e. the above point).\n","maintainers":[{"email":"ray@sumatro.co.uk","name":"raybooysen"},{"email":"keithwoods@live.com","name":"sonic78"}],"time":{"modified":"2022-06-19T18:46:36.564Z","created":"2015-05-31T19:50:56.099Z","0.0.1":"2015-05-31T19:50:56.099Z","0.0.2":"2015-06-11T22:04:24.055Z","0.0.3":"2015-06-12T08:21:12.816Z","0.0.4":"2015-06-12T10:25:14.609Z","0.0.6":"2015-06-13T10:22:14.188Z","0.0.7":"2015-06-13T17:06:40.351Z","0.0.8":"2015-06-13T17:08:23.578Z","0.0.9":"2015-06-18T21:26:38.746Z","0.0.10":"2015-06-18T21:39:04.342Z","0.0.12":"2015-06-20T13:33:13.287Z","0.1.0":"2016-04-21T16:42:23.531Z","0.1.1":"2016-04-22T14:51:41.894Z","0.1.2":"2016-04-22T15:10:23.580Z","0.1.3":"2016-04-27T14:42:16.712Z","0.1.5":"2016-05-14T19:12:44.580Z","1.0.0":"2017-01-09T16:51:03.058Z","1.0.1":"2017-01-10T15:33:03.427Z","1.1.0":"2017-02-01T15:35:39.152Z"},"homepage":"https://github.com/KeithWoods/microdi-js#readme","repository":{"type":"git","url":"git+https://github.com/KeithWoods/microdi-js.git"},"author":{"name":"Dev Shop Limited"},"bugs":{"url":"https://github.com/KeithWoods/microdi-js/issues"},"license":"Apache-2.0","readmeFilename":"ReadMe.md","keywords":["di","dependency injection","inversion of control","ioc","container","unity","object builder"],"users":{"rdingwall":true}}