{"_id":"wantsit","_rev":"49-b822f4bb21a37c5993de876c976ee38d","name":"wantsit","description":"Super lightweight dependency injection","dist-tags":{"latest":"2.1.3"},"versions":{"1.0.0":{"name":"wantsit","version":"1.0.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/wantsit/issues"},"_id":"wantsit@1.0.0","dist":{"shasum":"65f0febdfcaae92d8030e4b89bd6cafec86fb998","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.0.tgz","integrity":"sha512-CjYztGzG6kbHkG/RYkppga/bxShN1CVryHWu/11MoxhH8DVX0ibKxKhpxkj9Wx4XUJdyb4szgOYi9kNNr8WDzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAiwy/+ja0JOAg4Hh1vDdyKdYaui6SK+jMNLl+VJtDBjAiAXRROiaeLFu0m30I/5t2FAwc1ItB5Ug6Bdib/x+22w/w=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{}},"1.0.1":{"name":"wantsit","version":"1.0.1","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/wantsit/issues"},"_id":"wantsit@1.0.1","dist":{"shasum":"141cd8441fe9472ae4887d0b664031559572778d","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.1.tgz","integrity":"sha512-WmpyeuutQpWwkUZiFkTe/mBoi4zEsQdemRL76X7g4SLUiMJ+Zh0DYxOGoZMq6vrVZ+olwgOUclOsVV25hP/ZPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGq5jLzvvl7sF/26mYGkfkdPEF/+xgM7vrwm16h97DGBAiB2XTISQqElRDcMpKTd7dKBAmOw7BS4sMO6CcxOHYhUtQ=="}]},"_from":".","_npmVersion":"1.3.8","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{}},"1.0.2":{"name":"wantsit","version":"1.0.2","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3","check-types":"~0.6"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/wantsit/issues"},"_id":"wantsit@1.0.2","dist":{"shasum":"da337bab49ca361b791f3931d00f6836c6b669f1","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.2.tgz","integrity":"sha512-9TSs2WbQuW4cUoenqHEcdVwbW4RPpw0xXSi8+BB0uAqCLNipTMQZSHLfKgItyBB+HDjgNNhz0aNYvtfJo5Q7vQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHzgcx6zH6VGYjcHcyPUB4oH5POcgnjOdMqfAjs4/uovAiBCzcCi5Qwyp0//LPh6C5TCuOvrpDQSEpTGKqxJr7pmdw=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{}},"1.0.3":{"name":"wantsit","version":"1.0.3","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3","check-types":"~0.6"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"_id":"wantsit@1.0.3","dist":{"shasum":"6af0f9754489fbf42788a57aff46600194fa9a8c","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.3.tgz","integrity":"sha512-/pY9JXgAgb8uL+ih44C0/kVZ/Eownlct81/W08cdTPRRvQQhslFH8XJwm8IsPywpG5xbga9aDq8giQ2drlBd2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEfEgbIDevuq7YekW8rszmp3S01/cjoBbvTEPbXRvGUiAiB7hKmBaH4DGScNIcZClbqHS2xXDJQz+4+vysGkkw6RqA=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"directories":{}},"1.0.4":{"name":"wantsit","version":"1.0.4","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3","check-types":"~1.1"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"_id":"wantsit@1.0.4","dist":{"shasum":"9f758026c713a4ff714680e2b5dc53e27fe36bfc","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.4.tgz","integrity":"sha512-v28kkvuVkcrPozJUY1pSPSH9RT+Um9qRISATQrdiU5HgvW6HYvYgZL6LihRo4FUIct4Q3lIjh/wfHeuJIaOAZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDU8ChRnjnP74ioP0qObXNGqp5E/DAOJSCt/v4FxNRi7AIhAKqXIGndlY1ks52jYrKiYEJmasNmv5itg0FjOQm65QJs"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.0.5":{"name":"wantsit","version":"1.0.5","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"winston":"~0.7","underscore.string":"~2.3","check-types":"~1.1"},"devDependencies":{"nodeunit":"~0.8","jsmockito":"~1.0","jshamcrest":"~0.7","istanbul":"~0.1"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.0.5","dist":{"shasum":"9374e381829a0975d52501b397a5ceab6d1e492b","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.0.5.tgz","integrity":"sha512-uh8l5PoEuN4cjTCFIHRivC9j/kNHhCub6fQhrQZqhYluBniLwUwUxIpuYjwG3ldEXH0ol/zpZUzYz1YRM21EGw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCablKLEH6YtAfFylvFD7BMc/cb6Br1LqmDCnTXHg51ZgIgeF9EbvxkmDCP3ifxVC4lqxA3gxkrFK8Uisyx9jKvfWk="}]},"_from":".","_npmVersion":"1.3.14","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.2.0":{"name":"wantsit","version":"1.2.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"winston":"^0.7","underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.8","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.2","should":"^3.1","coveralls":"^2.8"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.2.0","dist":{"shasum":"6b935a6f2c30afaf7dcb3d0e9d55428458ec1fd6","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.2.0.tgz","integrity":"sha512-YpXwzV/VxQHHg51xWRvOmkxyY3m3lbs21i0hmDA6pjgC2ame6c+9MlAS5BPUxymUqhElmpkhFd/m3zZ3drc9Ag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC1h8n/QBAen+DpmMN1iinMu64GOu8eDzhLv8L486KOIgIgE5y2KlwNT5xSgR4sTht672KMMnUjtT/jmQkU/a2ZCX8="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.2.1":{"name":"wantsit","version":"1.2.1","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.8","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.2","should":"^3.1","coveralls":"^2.8"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.2.1","dist":{"shasum":"c1e271a998fe5c3bc29ae9dac356a0e934852f4e","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.2.1.tgz","integrity":"sha512-PU1YNH225LS7gyFz0JwE8aNbHpVu43LUgx8e1RkGsxAn2OX8PTzCcj05WRrGgyVC5Lq87WpHBZD77s11Kc3moQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJ7IB65iXmrk85PN0iBe841/vqVc5kwsCulddinoxztwIgFHGsx6LItNSwIxe19E7Qt+JOB7p4v2+rVG/rqvjhL6I="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.3.1":{"name":"wantsit","version":"1.3.1","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.8","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.2","should":"^3.1","coveralls":"^2.8"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.3.1","dist":{"shasum":"bc69c79b889e58b7d41c402add30c79c2e6a19ee","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.3.1.tgz","integrity":"sha512-DGA/776hCnLu930YWA/6X+K0cmxnBHHcVgAbx0/9d0VwVEuiMPP6kagTx4LJ/Krtp0z3HGmO6o0bwcaJwmDfuA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7ttbavzeUV+RpY9nOKxOQnO/PoTExkLjNKocuGB/F9gIgLjTg0JuzaLUtll8+ZTUbIlc0AUt4rjTC2jYzflMxphY="}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.3.2":{"name":"wantsit","version":"1.3.2","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.8","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.2","should":"^3.1","coveralls":"^2.8"},"bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.3.2","dist":{"shasum":"7854737baf39f1fe837270d8d99901843381ea92","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.3.2.tgz","integrity":"sha512-c1Cqp76UbXRt/NkN6wnpA6KM19C6mtHNOfunbOYHWQPff3mBYMIZCmn+nJH4CilIa1kzw4DHLSSH9gXwfZiIcg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoPQntUbbriVuDitBwM7x0BR8zFNA7OvKR78wtSFSaNAIhAPL3Lw+vUjvQ8y5/p5AgA4rNUBeK6rbZUGLhFrFs3BDT"}]},"_from":".","_npmVersion":"1.4.4","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}]},"1.3.3":{"name":"wantsit","version":"1.3.3","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.8","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.2","should":"^3.1","coveralls":"^2.8"},"gitHead":"1897f12bb82bf8d41344cc9b5608ffc6f89d75bd","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.3.3","_shasum":"73ca00fc232ab80e28e0ea6a65ba9568a8344d0f","_from":".","_npmVersion":"1.4.21","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"73ca00fc232ab80e28e0ea6a65ba9568a8344d0f","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.3.3.tgz","integrity":"sha512-LVakI27aI3pW2OeNXJJD06VW40st6NMl+2l3Am0j8xJNLy4/mqD1hbB9tLKyRDnevTJS3LNuWON1Fg85Ahs41g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbsL0aFdx+ZUodWxeM8CsdYJMGWWUAsd2wbXL0HRuAKAiAlYLLOnYpSRaNeK1dydDFXJhpLL9WhFLkj+igE3JD9Xw=="}]}},"1.4.0":{"name":"wantsit","version":"1.4.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.9","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.3","should":"^4.0","coveralls":"^2.8"},"gitHead":"5853db57cdb106833aea68714e3dab48aa385f14","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.4.0","_shasum":"d36d62ca22fa2e48f4f332e35150c2d766d7b318","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"d36d62ca22fa2e48f4f332e35150c2d766d7b318","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.4.0.tgz","integrity":"sha512-K43klaBN+GyjJcVGCixlCeao300MKGtFQA6GrA8LqWbzPd/tuRhsdt/37tK73bYzEjqvyDkghckb5DFxXcnSfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgavLiyXKfwf2+Y3itT+Xlrg8fWJuux+S9EICDuRXTngIgRrQgFgXhy41kN1C1iFfTZPelCNLEoGdGBXLzaSousWI="}]}},"1.5.0":{"name":"wantsit","version":"1.5.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover nodeunit test","coveralls":"istanbul cover nodeunit test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^1.1","toarray":"^0.0"},"devDependencies":{"nodeunit":"^0.9","jsmockito":"^1.0","jshamcrest":"^0.7","istanbul":"^0.3","should":"^4.0","coveralls":"^2.8"},"gitHead":"952601fb40a28f96e1a3e2b931090533b107c051","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@1.5.0","_shasum":"daf6707f2f2e3d5ca91b0c86c9687909ba91473e","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"daf6707f2f2e3d5ca91b0c86c9687909ba91473e","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-1.5.0.tgz","integrity":"sha512-1LSqtW2K07Oeuyt/grGAljM1eRVipBuPeQKBHAWmj6xK7+V45tOadpVfOoKRYsdwraCHklZ2tWvdW0Du5dCjrw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoeQ84Z/ovMKAirkV93Li6xPnooBKFKy2XQooCYIRcugIgQOcC3LAg150fDb9B/ta6ytIgTI9YL6mYWdr6KBdatt0="}]}},"2.0.0":{"name":"wantsit","version":"2.0.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^2.0","toarray":"^0.0","async":"0.9"},"devDependencies":{"chai":"^1.0","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^0.0","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"d01e3e5a72cafd5960e3592530b432f916c9ffa9","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.0.0","_shasum":"f9f80fad1f31aed60dcfda07ee339f8e83da3a18","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"f9f80fad1f31aed60dcfda07ee339f8e83da3a18","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.0.0.tgz","integrity":"sha512-RKHcqViiDJhdMlAeHU9JKkB4UMsyYOgshlGna1EQ7HDb/zxP2REyDcxENC24yXfyAXHi9j6a2Eq87+6JwuTQhA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFpWCM3seHPAmbwOzW0zPNo1ZGS2kfzQpgLjZmjUTPsQIhAPgRveL9RDkIZNnw9qKHo+WrYsxspaTGeSxyNrXe0m7z"}]}},"2.0.1":{"name":"wantsit","version":"2.0.1","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^2.0","toarray":"^0.0","async":"0.9"},"devDependencies":{"chai":"^1.0","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^0.0","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"2d2ebf403985d7c7c7ee63e16796611baef17161","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.0.1","_shasum":"fdb7170b75a86dd20972702fd7ced08299578314","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"fdb7170b75a86dd20972702fd7ced08299578314","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.0.1.tgz","integrity":"sha512-mcuZTKj1m5y0qID6d5QZpUXZjXDx2qSj+cR/MB6YsgKllTuNbUzxuf1M6dJ2P0DNo1cvDlqfLGxjZFEXVJzAjg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUulwVoG5lXuncCn8uqZi2wC0GwDfygV7JVN3+LGukkAIhAMx4o5xNusiZv5cx4/EdyixaKMDsJz59yWmvZNWTCYS8"}]}},"2.0.2":{"name":"wantsit","version":"2.0.2","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"underscore.string":"^2.3","check-types":"^2.0","toarray":"^0.0","async":"0.9"},"devDependencies":{"chai":"^1.0","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^0.0","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"c26d0f5f7ba74f6973f8ba30e4907db1dddd2345","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.0.2","_shasum":"bb54f26ddc9eb6456c0fce72f2ebed2f5320bc6c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"bb54f26ddc9eb6456c0fce72f2ebed2f5320bc6c","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.0.2.tgz","integrity":"sha512-L9amWbinHhhaBpHnL7icbzHzqBbdbBpuexpRs6IjBBPYgOOPqvUCQIHf5S0vDVTYLMq7QHXHFeE8osINixBzag==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAixdfTWhI01RN0XI4TeltsANBMC3sP0kcDBrGCnLhmiAiEA3KGK4B1FjP53fPwspoof6epD64Gb/knDmnJLbp1AcPY="}]}},"2.1.0":{"name":"wantsit","version":"2.1.0","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"async":"^0.9","check-types":"^3.1.1","toarray":"^0.0","underscore.string":"^3.0.3"},"devDependencies":{"chai":"^2.1.2","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^1.0.6","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"93932f0419cf7d1c7bbaa840a48d4627fa850100","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.1.0","_shasum":"96d4e1fd5d48db2eaadc1a7094fd37beb457a34c","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"96d4e1fd5d48db2eaadc1a7094fd37beb457a34c","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.1.0.tgz","integrity":"sha512-KVpJ/mlz48ldZzj74hIzDqtgjVw6uJ8Xkeyv0RxbflW99RCfPgNVBaky4Buuy+wxYJ8LZxhHpoaGjxAdQMg71w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxuaqwtFwc/wU1Pztj9Yypa0Dl4BAhk+fWJf/HX5P98gIgGOwIjgaBoeJeKqrxKeEvWuoZMOU/1D+miIcZzDQCbLU="}]}},"2.1.1":{"name":"wantsit","version":"2.1.1","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"async":"^0.9","check-types":"^3.1.1","toarray":"^0.0","underscore.string":"^3.0.3"},"devDependencies":{"chai":"^2.1.2","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^1.0.6","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"9216b46510a9c6590fd643509155e69474478727","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.1.1","_shasum":"527a4b184076310ab8e87e6d117c0634fbc01037","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"527a4b184076310ab8e87e6d117c0634fbc01037","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.1.1.tgz","integrity":"sha512-d8Et0oUaZ6RIm1Vkd5YTAbxaYMUkvDr9S76TJm3dJMgNd19M0A2tTOuVrSwy/mjApeZBKIbUc/696+Y6ElXZcQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa+SILjzN/JP2bGBZr5qbdNADCJlfWst3YdVD/aPLpHAIgEaKQRAFu+r8w5s/ONooTP2cfMbcjsARyTJdm7zCk86s="}]}},"2.1.2":{"name":"wantsit","version":"2.1.2","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"istanbul cover _mocha test","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"async":"^0.9","check-types":"^3.1.1","toarray":"^0.0","underscore.string":"^3.0.3"},"devDependencies":{"chai":"^2.1.2","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^1.0.6","proxyquire":"^1.0","sinon":"^1.8","testsuite":"^1.0"},"jshintConfig":{"asi":true,"browser":true,"curly":false,"expr":true,"indent":2,"loopfunc":true,"node":true,"trailing":true,"undef":true,"white":true},"gitHead":"491d58984f393e71a910cc1f2d430e851eeb1087","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit","_id":"wantsit@2.1.2","_shasum":"e868055197acceae3e4ebbd324805065a6417829","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"e868055197acceae3e4ebbd324805065a6417829","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.1.2.tgz","integrity":"sha512-MnlYfU7bmhGct9E8bDGBK9FlwCcT89AFUJoRUPDlXtqVGZyr2GEjagl2EtBNh/UmrmFyZGzgIiHueNXXwahOPg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTTanTZXh6x3cJXAQtRsTYaXhJzzZf3iTFKh14nlgifAiAOFwtSMqhy6qj+dvAe0+l1QiMkB4ZQt4WvqDyL9shh4A=="}]}},"2.1.3":{"name":"wantsit","version":"2.1.3","description":"Super lightweight dependency injection","main":"index.js","scripts":{"test":"./node_modules/mocha/bin/mocha","test:coverage":"./node_modules/istanbul/lib/cli.js --include-all-sources cover ./node_modules/mocha/bin/_mocha","test:coverage:verify":"./node_modules/istanbul/lib/cli.js --include-all-sources cover ./node_modules/mocha/bin/_mocha && istanbul check-coverage --statement 100 --branch 100 --function 100","coveralls":"istanbul cover _mocha test && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","lint":"standard"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"dependencies":{"async":"^1.4.0","check-types":"^3.1.1","toarray":"^0.0","underscore.string":"^3.0.3"},"devDependencies":{"chai":"^3.2.0","coveralls":"^2.8","istanbul":"^0.3.0","mocha":"^2.0","pre-commit":"^1.0.6","proxyquire":"^1.0","sinon":"^1.8","standard":"^4.5.4","testsuite":"^1.0"},"pre-commit":["lint","test:coverage"],"standard":{"global":["describe","it","expect"]},"gitHead":"f6afdc5e3a67e802b6aefe462d67b7e264b0b96b","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"homepage":"https://github.com/achingbrain/node-wantsit#readme","_id":"wantsit@2.1.3","_shasum":"04297fef083d2b91c038b78b853d2fc87d21a277","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.6","_npmUser":{"name":"achingbrain","email":"alex@achingbrain.net"},"maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"dist":{"shasum":"04297fef083d2b91c038b78b853d2fc87d21a277","tarball":"https://registry.npmjs.org/wantsit/-/wantsit-2.1.3.tgz","integrity":"sha512-KZKf/OhCC+4OtkFZEzifdmNPinS4dfdFHga8ScvkeJwEO86L9+lOdg2IxK+wKlrnW6LPySMQHvgu4v1rLopFHg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICT5MM+o61kqkaq5jUkloDITR+smSsLiJWgqZm2K2mfDAiANrCJ+lJS6vMtTV6VFMQj4JCYhaUwWAA6ptM06IIVj+w=="}]}}},"readme":"# wantsit\n\n[![Dependency Status](https://david-dm.org/achingbrain/node-wantsit.svg?theme=shields.io)](https://david-dm.org/achingbrain/node-wantsit) [![devDependency Status](https://david-dm.org/achingbrain/node-wantsit/dev-status.svg?theme=shields.io)](https://david-dm.org/achingbrain/node-wantsit#info=devDependencies) [![Build Status](https://img.shields.io/travis/achingbrain/node-wantsit/master.svg)](https://travis-ci.org/achingbrain/node-wantsit) [![Coverage Status](http://img.shields.io/coveralls/achingbrain/node-wantsit/master.svg)](https://coveralls.io/r/achingbrain/node-wantsit)\n\nSuper lightweight dependency resolution, autowiring and lifecycle management.\n\nOr, yet another dependency injection framework.\n\n## Wat?\n\nUsing dependency injection decouples your code and makes it more maintainable, readable and testable.\n\nImagine I have some code like this:\n\n```javascript\nvar MadeUpDb = require('madeupdb')\n\nvar MyClass = function() {\n  this._db = new Madeupdb('localhost', 'database_name', 'username', 'password')\n}\n\nMyClass.prototype.getTheThings() {\n  return this._db.query('SELECT foo FROM bar')\n}\n```\n\n`MyClass` is tightly coupled to `MadeUpDb`, which is to say I can't use this class now without having `MadeUpDb` available on `localhost` and `database_name` configured for `username:password@localhost`, nor can I use a different implementation (a mock object, in memory db, etc - perhaps for testing purposes).\n\nIf instead I did this:\n\n```javascript\nvar Autowire = require('wantsit').Autowire\n\nvar MyClass = function() {\n  this._db = Autowire\n};\n\n...\n```\n\nNot only is there less boilerplate, `MyClass` has been freed from the responsibility of configuring and acquiring a data source (a beard might call this [Inversion of Control](http://en.wikipedia.org/wiki/Inversion_of_control)) which lets me:\n\n * Concentrate on the interesting bits of `MyClass` (e.g. `getTheThings()`)\n * Easily mock behaviour in tests by setting `_db`\n * Control resources centrally (were I to have two instances of `MyClass`, the can now share a db connection)\n * Introduce new functionality without changing `MyClass`. Want a connection pool? No problem, want to wrap `MadeUpDb`, [AOP](http://en.wikipedia.org/wiki/Aspect-oriented_programming) style? Done.  Swap `MadeUpDb` for `NewHotDB`? Easy.\n\nAmazing, right?\n\n## I'm sold, show me an example\n\n```javascript\nvar Autowire = require('wantsit').Autowire,\n  Container = require('wantsit').Container\n\nvar Foo = function() {\n  // works with this._bar or this.bar\n  this._bar = Autowire\n};\n\nFoo.prototype.doSomething() {\n this._bar.sayHello()\n}\n\n...\n\nvar Bar = function() {\n\n}\n\nBar.prototype.sayHello() {\n  console.log('hello!')\n}\n\n...\n\nvar container = new Container()\ncontainer.register('bar', new Bar())\n\nvar foo = new Foo()\ncontainer.autowire(foo)\n\nfoo.doSomething() // prints 'hello!'\n```\n\n## Lifecycle management\n\n`container.create` will instantiate your object and autowire it:\n\n```javascript\ncontainer.create(Foo)\n...\n```\n\nPass a callback function if you require access to your object after creation:\n\n```javascript\ncontainer.create(Foo, function(error, foo) {\n  ...\n})\n```\n\nConstructor arguments are also supported by passing an array of arguments:\n\n```javascript\nvar Foo = function(message) {\n  console.log(message)\n}\n\nvar foo = container.create(Foo, ['Hello world!'])\n...\n```\n\n## Magic methods\n\nThere are optional methods you can implement to be told when things happen.\n\n```javascript\n// called after autowiring and before afterPropertiesSet\nFoo.prototype.containerAware = function(container) {\n\n}\n\n// called after autowiring and after containerAware\nFoo.prototype.afterPropertiesSet = function([done]) {\n\n}\n```\n\nIf you specify an argument to `afterPropertiesSet`, you can defer execution of the callback:\n\n```javascript\n// called after autowiring and after containerAware\nFoo.prototype.afterPropertiesSet = function(done) {\n  this._dep(function(error) {\n    done(error)\n  })\n}\n...\n\ncontainer.create(Foo, function(error, foo) {\n  // will not be invoked until foo._dep (above) has returned \n})\n```\n\n`afterPropertiesSet` will be invoked on your class after is has been invoked on all dependencies that also declare it:\n\n```javascript\nFoo = function() {}\nFoo.prototype.afterPropertiesSet = function(done) {\n  // do something that takes a while\n  setTimeout(done, 1000)\n}\n\nBar = function() {\n  this._foo = Autowire\n}\nBar.prototype.afterPropertiesSet = function() {\n  // will not be invoked until the callback passed to \n  // foo.afterPropertiesSet has been called\n}\n\n...\n\ncontainer.createAndRegister('foo', Foo)\ncontainer.createAndRegister('bar', Bar)\n```\n\nN.b. this means that circular dependencies are not allowed as they will never initialise!\n\n### Initialisation timeouts\n\nBy default we wait up to 5000ms for a deferring `afterPropertiesSet` to invoke the passed callback.  To override this timeout, pass an option to the container constructor:\n\n```javascript\nvar container = new Container({\n  timeout: 10000 // or 0 to disable the timeout\n})\n```\n\n## Dynamic getters\n\nLook-ups occur at runtime, so you can switch out application behaviour without a restart:\n\n```javascript\n// create a bar\ncontainer.register('bar', function() {\n  console.log('hello')\n})\n\n// this is our autowired component\nvar Foo = function() {\n  this._bar = Autowire\n}\n\nFoo.prototype.doSomething = function() {\n  this._bar();\n}\n\n// create and autowire it\nvar foo = container.create(Foo)\n\nfoo.doSomething() // prints 'hello!'\n\n// overwrite bar\ncontainer.register('bar', function() {\n  console.log('world')\n})\n\nfoo.doSomething() // prints 'world!'\n```\n\nAll autowired properties are converted to non-enumerable fields so we can `JSON.stringify` without serialising the entire object graph.\n\n## I want to register all of the things!\n\n```javascript\ncontainer.createAndRegisterAll(__dirname + '/lib')\n```\n\nTo use this, all your components must be in or under the lib directory.  Anything that ends in `.js` will be newed up and autowired.\n\nNo constructor arguments are supported, it's `Autowire` all the way down.\n\n### Woah, not literally all of the things\n\nOk, specify a regex as the second argument - anything that matches it will be excluded\n\n```javascript\ncontainer.createAndRegisterAll(__dirname + '/lib', /excludeme\\.js/)\n```\n\nRegex?  Great, now I've got two problems.  Why stop there?  Pass in an array of regexes:\n\n```javascript\ncontainer.createAndRegisterAll(__dirname + '/lib', [/pattern1/, /pattern2/])\n```\n\n### I want to have functions automatically registered\n\nDeclare them in a file with a lowercase letter.  Eg:\n\n```javascript\n// myFunc.js\nmodule.exports = function() {\n  return true\n}\n```\n\n..as opposed to a class which should be in a file that starts with a capital letter:\n\n```javascript\n// MyClass.js\nvar MyClass = function() {}\n\nMyClass.prototype.foo = function() {\n  return true\n}\n\nmodule.exports = MyClass\n```\n\n```javascript\ncontainer.createAndRegisterAll(__dirname + '/lib')\n\n// find and invoke our function\nvar foo = container.find('myFunc')\nfoo()\n\n// find and invoke a method on our singleton\nvar myClass = container.find('myClass')\nmyClass.foo()\n```\n\n### I want to register a function on a class\n\nNo problem, just use the `createAndRegisterFunction` method.  The first argument is the name to register the\nfunction under, the second is the name of the method on the class, the third is the class constructor. Any\nsubsequent arguments will be passed to the constructor.\n\n```javascript\n// MyClass.js\nvar MyClass = function() {}\n\nMyClass.prototype.foo = function() {\n  return true\n}\n\nmodule.exports = MyClass\n```\n\n```javascript\ncontainer.createAndRegisterFunction('fooFunc', 'foo', MyClass)\n\n// find and invoke our function\nvar foo = container.find('fooFunc')\nfoo()\n```\n\n### My dependency is optional\n\nPass the `optional` option to Autowired:\n\n```javascript\n// MyClass.js\nvar MyClass = function() {\n  this._foo = Autowired({optional: true})\n};\n\nMyClass.prototype.doSomething = function() {\n  // we are now responsible for making sure this._foo is not null before using it\n  if(this._foo) {\n    // ...\n  }\n}\n```\n\n### I don't want to use the property name to resolve my dependency\n\nPass the `name` option to Autowired:\n\n```javascript\n// index.js\ncontainer.register('bar', {\n  baz: function() {\n    return 'hello!'\n  }\n})\n\n// MyClass.js\nvar MyClass = function() {\n  this._foo = Autowired({name: 'bar'})\n};\n\nMyClass.prototype.doSomething = function() {\n  // this._foo is 'bar' from the container\n  this._foo.baz()\n}\n```\n\n## Object Factories\n\nYou can also automate the creation and autowiring of classes\n\n```javascript\nvar ObjectFactory = require('wantsit').ObjectFactory\n\nvar Foo = function(arg1, arg2) {\n  this._arg1 = arg1\n  this._arg2 = arg2\n\n  // Autowired fields will be populated automatically\n  this._dep = Autowired\n}\n\n// place an instance of the factory in the container\ncontainer.createAndRegister('fooFactory', ObjectFactory, [Foo]);\n\n// MyClass.js\nvar MyClass = function() {\n  this._fooFactory = Autowired\n}\n\nMyClass.prototype.doSomething = function() {\n  this._fooFactory.create(['one', 'two'], function(error, foo) {\n    foo._arg1 // 'one'\n    foo._arg2 // 'two'\n  })\n}\n```\n\n## Events\n\n### `error`\n\nThe `error` event will be emitted if a component throws an error event during invocation of it's constructor, or `afterPropertiesSet`/`containerAware` methods, or if it passes an error object to the the `afterPropertiesSet` callback.  If a callback was passed to the `create` method, it will receive the error instead:\n\n```javascript\n// class that throws an error during construction\nvar Foo = function() {\n  throw new Error('Panic!')\n}\n\n...\n\n// no callback passed to `createAndRegister` so container emits error event\nvar container = new Container()\ncontainer.createAndRegister('foo', Foo)\ncontainer.on('error', function(error) {\n  // receives error event\n})\n\n...\n\n// here we pass a callback which will receive the error instead\nvar container = new Container()\ncontainer.createAndRegister('foo', Foo, function(error) {\n  // receives error event\n})\n```\n\n### `ready`\n\nThe `ready` event will be emitted once all currently registered components have initialised.  If you subsequently register new components, this event will fire again.\n\nThe container will be passed as the first argument to listeners.\n\n## Full API\n\n### Constructor\n\n```javascript\nvar container = new Container({\n  // an optional logger (e.g. Winston). Defaults to the console.\n  logger: {\n    info: function(message) {},\n    warn: function(message) {},\n    error: function(message) {},\n    debug: function(message) {}\n  },\n  \n  // how long to wait for deferred `afterPropertiesSet` methods to invoke the callback\n  timeout: 5000\n})\n```\n\n### Methods\n\n`container.register(name, component)` Store a thing\n\n`container.find(name)` Retrieve a thing - can by by name (e.g. `'foo'`) or by type (e.g. `Foo`)\n\n`container.autowire(component)` Autowire a thing\n\n`container.create(constructor, [arg1, arg2...], callback)` Create and autowire a thing\n\n`container.createAndRegister(name, constructor, [arg1, arg2...], callback)` Create, autowire and register a thing\n\n`container.createAndRegisterAll(path, excludes)` Create, autowire and register anything under `path` that doesn't match `excludes`\n\nIn `create` and `createAndRegister` above, `arg1, arg2...` are passed to `constructor`\n\n`container.setLogger(logger)` Override the default logging implementation - the passed object must have `info`, `warn`, `error` and `debug` methods.\n","maintainers":[{"name":"achingbrain","email":"alex@achingbrain.net"}],"time":{"modified":"2022-06-28T21:46:33.075Z","created":"2013-10-10T10:13:26.249Z","1.0.0":"2013-10-10T10:13:28.717Z","1.0.1":"2013-10-10T13:13:34.707Z","1.0.2":"2013-10-28T20:48:59.321Z","1.0.3":"2013-11-05T12:58:35.088Z","1.0.4":"2013-11-10T22:15:51.654Z","1.0.5":"2013-11-19T07:50:20.338Z","1.2.0":"2014-03-04T07:46:39.047Z","1.2.1":"2014-03-30T08:11:17.346Z","1.3.1":"2014-05-30T16:05:17.666Z","1.3.2":"2014-05-30T16:30:34.511Z","1.3.3":"2014-10-27T17:55:19.638Z","1.4.0":"2014-11-03T18:19:15.738Z","1.5.0":"2014-11-26T08:08:42.171Z","2.0.0":"2015-01-05T09:40:27.712Z","2.0.1":"2015-02-01T07:38:45.031Z","2.0.2":"2015-02-01T18:12:02.836Z","2.1.0":"2015-03-23T12:33:34.826Z","2.1.1":"2015-04-10T10:04:23.285Z","2.1.2":"2015-04-10T10:28:55.192Z","2.1.3":"2015-07-27T14:41:50.519Z"},"repository":{"type":"git","url":"git://github.com/achingbrain/node-wantsit.git"},"homepage":"https://github.com/achingbrain/node-wantsit#readme","bugs":{"url":"https://github.com/achingbrain/node-wantsit/issues"},"readmeFilename":"README.md","users":{"456wyc":true}}