{"_id":"@aantthony/ioc","_rev":"5-834d613b0117b11bb9db18e796e5e93f","name":"@aantthony/ioc","description":"Inversion of control","dist-tags":{"latest":"3.0.2"},"versions":{"1.0.0":{"name":"@aantthony/ioc","version":"1.0.0","description":"Inversion of control","main":"index.js","scripts":{"test":"echo Done"},"repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"license":"MIT","bugs":{"url":"https://github.com/aantthony/ioc/issues"},"homepage":"https://github.com/aantthony/ioc#readme","dependencies":{"fn-annotate":"^1.2.0"},"devDependencies":{"@aantthony/logger":"^1.1.1"},"gitHead":"63450c049c6b7d0404381067466de3b7c5a33a18","_id":"@aantthony/ioc@1.0.0","_npmVersion":"5.5.1","_nodeVersion":"8.5.0","_npmUser":{"name":"aantthony","email":"hi@af.id.au"},"dist":{"integrity":"sha512-RhK1wLLBOONGmdNJCJsZ6x79rMIl3t1rQG2JM63gsb2FainF2Gn2s+Ac5oKiK0seB8gOKl/rUP6XJn639tmTYg==","shasum":"73398547641deb42e2b5f0f5e8ca451f4c43d767","tarball":"https://registry.npmjs.org/@aantthony/ioc/-/ioc-1.0.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGdqoaRXCv5dxix88NmDeix0eDLqzkxewfej72sk9vJ9AiAG4PGoiWzACE0QR67zUUAIjqHCYbVVUENwVn8Mree/Ag=="}]},"maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ioc-1.0.0.tgz_1512386292758_0.4899532876443118"},"directories":{}},"2.0.0":{"name":"@aantthony/ioc","version":"2.0.0","description":"Inversion of control","main":"index.js","scripts":{"test":"echo Done"},"repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"license":"MIT","bugs":{"url":"https://github.com/aantthony/ioc/issues"},"homepage":"https://github.com/aantthony/ioc#readme","dependencies":{"fn-annotate":"^1.2.0"},"devDependencies":{"@aantthony/logger":"^1.1.1"},"gitHead":"83ca525a2cfcd268e3652f1c5449fad20e0fed7f","_id":"@aantthony/ioc@2.0.0","_npmVersion":"6.0.1","_nodeVersion":"8.11.1","_npmUser":{"name":"aantthony","email":"hi@af.id.au"},"dist":{"integrity":"sha512-zrjiH6OwI9YTT+DyfyLRPEvguqRo2pcPZ4ePfY5FepbJiH4WdIDYQK/T+7sesGNz+nWPs0BQ0n67MkNRqUgDFQ==","shasum":"a50cfbb5eb70fb0b55eb7cd06e1561b458d36ac5","tarball":"https://registry.npmjs.org/@aantthony/ioc/-/ioc-2.0.0.tgz","fileCount":5,"unpackedSize":5081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbBl3FCRA9TVsSAnZWagAAx+0P/jA8gd8PGRTP/i4UWtno\n6sE+qEEBYUhMRDMyAFO0d1UZFj3+02jNqqYIc/ZgYU4TywjoSUtrC2zaw3p2\nRAPLKfj8Fu6NbP4Mhs39aArrCiMuARB97QUdlwglOhJBwWVVAEjWrRusGh37\nOrZOfzGlWfyBQugnWFgZ0UefGQzWk1VaS07a0DoVAeHo6sF5+m7NArchgw1l\nXvNtcBEew4QsQ8Y+F9Tc3A5HUrFFNNq2SdRSEj3Qf5jFClAofbbbMvcl78er\nw1+xwTdfAUAJb1s5cxAW4yPq8v/NTU08Xpd+qBP82QTmeYAgq3ITGYAWC2ev\nx4B3VpTFqDiYn1ePIPBKWhLmD7iVCxOVUtH8eVlmRzsRkuUN5gi2GDgwjNC1\n+bR1q2WaIqnGzmFM5gbLaU6fyBgBW7I/VZX0bq4aG8QJ/CMZmqax5S722sxj\nCzqKnvF2AQvvc8rtBe3Pa2w6pGBoE4/am9FopAjuA8bORU85See767i7bo9o\nFJ74SwT5l6sf51Sn4/Ve6OKzNHHrbdSlnxNME+p9l5IAkPEzFqGymDhWAS4P\nfWTi17GzX5N8CxRi3CqMKfMRhxQT8+UWTCPGdW0D7Yh5DZNIe2r4bl0vn8Yd\nPioOLxnmCGKKNgTbGDmiCHxNmMYzsVoFyZhJR4dlBcsy0AeuF3lG2b9LyieL\nJ78H\r\n=jRuq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJsLDCvkum6MR9upbBMgJw6tCPZ/7grIRFSoj4nzR7gAiA0QtaArmTkZbIoSLUP5lNZ2nRhL2cX/DHTV5x1WasEoQ=="}]},"maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ioc_2.0.0_1527143876769_0.020075750147270366"},"_hasShrinkwrap":false},"3.0.0":{"name":"@aantthony/ioc","version":"3.0.0","description":"Inversion of control","main":"index.js","scripts":{"test":"echo Done"},"repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"license":"MIT","bugs":{"url":"https://github.com/aantthony/ioc/issues"},"homepage":"https://github.com/aantthony/ioc#readme","dependencies":{"fn-annotate":"^1.2.0"},"devDependencies":{"@aantthony/logger":"^1.1.1"},"gitHead":"2573a8ce4fa387eaf6c56d2a5f6c99689ffbbf2e","_id":"@aantthony/ioc@3.0.0","_npmVersion":"6.3.0","_nodeVersion":"8.11.1","_npmUser":{"name":"aantthony","email":"hi@af.id.au"},"dist":{"integrity":"sha512-FQu6G2kANYhti4nLlutvub/va+Gophyu21IOaJJEkAcg7m1c99cTf427sdJ1RdCbfHJtlE7lzTK7I2Og6pSQiQ==","shasum":"9ce1631dd207257bdf789aede08cb28f54711887","tarball":"https://registry.npmjs.org/@aantthony/ioc/-/ioc-3.0.0.tgz","fileCount":5,"unpackedSize":6131,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbQGwCRA9TVsSAnZWagAAWhgP+wfPMOwICEAPqfeJo3CT\nWvd/Tfmw2GAm9jnuS0ijlI/N2vK5vyu+J1WoM1n7BcN4t0HaSIbUX9UkRqBV\n9nCkNFkHaay6ruHE/1tynyUhucbgaPECnynUC4BHnEcNnvn1DKZhfhE1Qk7H\nC2ll2yyptX5MxJcWFE5NZTabVkHwo+rNnXfxZprL7gjoKvBvPJ6Gc6ikryrn\niIYCLTu1tap+90m14m0luzGAVZh+d8v/GazXLtwAXleAPUQmJoN7cSvLe+1o\nb+HLF6RnBE8jIA4V68VQYzlgzVoxWJhEk9B20Qvefv0No3cpJ1M5Q2UazRci\nuEyTYZZsA3DYFYB3KULbjYLv5Y25+P5ciOG24wTQUMoVxIyNSKkqKYwHcB35\nGp4JXT9btrrtQ3MvedILJgsLcGubSQY+GDxQ/WhU0v4gkzW9qn1NbyuHEMZo\nyNe7Voams1EtXZzi5uarSEWfWcroQ294p+06hv5Lk/odi7Y0y6IgN5Yvyrpi\nhI3SYqjtCLy0pmJnqfo/VRWHj4Lq8QfyWAAuJgODqZ4Fdh2WQCOrDIB1uwLa\nJgcK1ZlCQWoG1ViE8c627axl1CEj+G/EgTlajK6Bvhj6UWz8HK40v5/MuqrE\n5Ef6EjPivb/d+f1KhsXRnBpzEyHN/Cpu2RGICmlgGFGC37OpNnBLRghfjlJ1\nfnFX\r\n=jAMX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWG9iaiC7LjrLt6lPdzJyMjJEruAiQ9Z1soYC+NW+YxwIgYIM6FMOWHDWiRE5xI7pZc12HERVUJ2vmqJLUGgk3rpY="}]},"maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ioc_3.0.0_1533870511875_0.9347219487959535"},"_hasShrinkwrap":false},"3.0.1":{"name":"@aantthony/ioc","version":"3.0.1","description":"Inversion of control","main":"index.js","scripts":{"test":"echo Done"},"repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"license":"MIT","bugs":{"url":"https://github.com/aantthony/ioc/issues"},"homepage":"https://github.com/aantthony/ioc#readme","dependencies":{"fn-annotate":"^1.2.0"},"devDependencies":{"@aantthony/logger":"^1.1.1"},"gitHead":"e9a7bb2d2b07ecff4abf15768cbcd6954c8b4753","_id":"@aantthony/ioc@3.0.1","_npmVersion":"6.3.0","_nodeVersion":"8.11.1","_npmUser":{"name":"aantthony","email":"hi@af.id.au"},"dist":{"integrity":"sha512-xIkMJ205sgbFI2t/ecpbT5wFhDZzjS2J1zI1HGpbYiX12Q9hZ7OzgDybB9HxpMnhCnDIxm5UKFpnuPxhsAgKYw==","shasum":"147cf9833530888e745a72737de5989abe58d255","tarball":"https://registry.npmjs.org/@aantthony/ioc/-/ioc-3.0.1.tgz","fileCount":5,"unpackedSize":6147,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbQJYCRA9TVsSAnZWagAA9R0P/1jxcQ+fsARDpgyBDK3W\nFtgxV6YXyHGDHuf3TXxoNnP6cIL2wwqFYbA+qgiQJBSW00d5S64qcbuPLVuV\nL+7Om383mdNskgiE1/9P6Od8IDaxqdBfO/WDn9KwMeNYxiw45KzIzel8YZiN\nmDNNJHYOMNn0ypvH+JEInCS3JUVNiqMw90SpRPuA4iOYzbC/S4n9NzLombQb\negbvqoaI9Ncd/SvUvTICU5hqnCfyu2qY7rAH7rkSAxWWsiiQubwxPmGgkLj3\na/YI3033N+8xISBYEd84FByiODK/0XfAg9JSroxDfJng84vW+rZyIu2YBuD6\nQKIq7ghN4KgJuTLHY97cLN0qQuI+ozy4PfSnU5ioGmcQyS50fLpMpyrABCF6\n7f56hWeeTuKHhsv8Al/wJNYlGaCYOXXpO7bA6kNFC/QEPB2LlgfAS2aUBX0b\nx5rl3A7UGkf4qEtyHD+NSkEneZgeXkykjs9+Am5zDfe/4ek0a/Rh2lUZZIca\nUvypHQpSLoj6gnBDQY0aKIaGlK3OcWIn5SrufcO3BMGGMOzx2D3EhlylKR5J\n2/wm+Z8l3ZfsGSKPw280oG4qgwLQwyDnDaa1Y/TSLGQBdFOrINtn71ddYufx\nfOXW9hjzFX8F9U4HWYw3bLn0q3BkEEl6b1GG66l03LR02oXxFU9SElFLCZSI\nTrSo\r\n=iLpK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFzNa2ec4ktsAsKkueeS/5s0j+/hiffIOxQ+9rOBqmT7AiBW8clvHOMruqPL3zvw9p1cj58mVo4ZsvQr7OL/tzCzew=="}]},"maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ioc_3.0.1_1533870680220_0.22440002480440402"},"_hasShrinkwrap":false},"3.0.2":{"name":"@aantthony/ioc","version":"3.0.2","description":"Inversion of control","main":"index.js","scripts":{"test":"echo Done"},"repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"license":"MIT","bugs":{"url":"https://github.com/aantthony/ioc/issues"},"homepage":"https://github.com/aantthony/ioc#readme","dependencies":{"fn-annotate":"^1.2.0"},"devDependencies":{"@aantthony/logger":"^1.1.1"},"gitHead":"9fbcfafb5dfe735bbd3ed1cabc7f88f073a3e010","_id":"@aantthony/ioc@3.0.2","_npmVersion":"6.3.0","_nodeVersion":"8.11.1","_npmUser":{"name":"aantthony","email":"hi@af.id.au"},"dist":{"integrity":"sha512-4oBO+p1/LFn+Eja58oVJ/FCMDgF5FK6QMzhYACygnlLY0r7lf4LjGGbqFKYIL/MfVeDHmelpIjVVtG23KziaJg==","shasum":"c9ceffd8d9de923117f5f39c37f0966c3025cb95","tarball":"https://registry.npmjs.org/@aantthony/ioc/-/ioc-3.0.2.tgz","fileCount":5,"unpackedSize":6217,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbbSzwCRA9TVsSAnZWagAAX8kP/1mHaxvigeSiradsc5no\nD2XemMhJ3bDWyZ0LL4HvEKUhhhTCm8o21NUJTGRWFJj6OiprV9yhLZrWvIxB\nZo9XxTifB/Oc04e/YokBQgC7eV0PC9W89WyEN9nptT+BG+4Pt+r3v2bJKrF4\n4JHLyCL7r9vW4JEKB4bnt5H8bGDTv+dwJmKqHN7OrRzfiGOtztOI/ihAZzva\nRZJeBVFwuAPY++mnj5tYvIXVS+XmMp3naADnWtyQhUK1q2htuT776ukExAHb\n6XpvArgEF4IM/9luYowv5O0p+U6rYTCZ+qdzEDOz0W6A1jkuNQsLSJyq6795\nlISKgRmBkWLZEpVbXv/BbBQaRoJ+U15jeI16XZVznaTMcE2IyjZ0hYvoaMdb\nuH8AVrBNuWcGzH4B3NMqy/2R6zfzn/W/1OZnQOxaej3SZjNbJPTVOf9hW11J\nKN9qiaGXLx3h/KuDhmfl/6wtCfArzjfOPs0fEQObTG1/pWG2yX1D3ePRthLc\n1C0s9ZOETC9UDF1nzEvUijauriphKcak4P8gqpglvQwPsh06SCbkJheC2OfN\nB46LbbEPwK4O91nR1YRyxEPSsS8PJwao2rQeJwGvVb2WR7qKhYJfNYf6jfJ7\nI0h66DoAJ86j9YcGE3FxEV77/G4J6d8v55QFfTdXLTnh27v7HMkMWxUeCiGl\n9aii\r\n=LAKL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDk6fyJtGFsfZ5GyPnboYTQwB7TBTp1jgJlvUwAUIt84AIgNMFnEEQF3mGSB1VWRG0ouKzv0vHKl+66KQZZoXPiR+M="}]},"maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ioc_3.0.2_1533881584177_0.2438564321986123"},"_hasShrinkwrap":false}},"readme":"# ioc\n\n\n## Installation\n\n```sh\nnpm install --save \"@aantthony/ioc\"\n```\n\n## Usage\n\n```js\nconst ioc = require('@aantthony/ioc');\nconst createLogger = require('@aantthony/logger');\n\nfunction createApplication() {\n  return ioc({\n    log: ioc.transient(module => createLogger(module.name)),\n    x() { return 1; },\n    y() { return 2; },\n    z() { return 3; },\n    example(x, y, z) {\n      return x + y + z;\n    },\n    demo(example, log) {\n      return {\n        run() {\n          log.info('Example = ' + example);\n        }\n      }\n    },\n    // anotherModule: require('./another-module'),\n  });\n};\n\nmodule.exports = createApplication();\n\n// 2017-12-04 11:15:47 demo: Example = 6\ncreateApplication().demo.run();\n```\n\n## Built in modules:\n\n### `module`\nAn object which describes the referring module.\nNOTE: If a service depends on `module`, it must be explicitly declared as `ioc.transient()` as is shown in the above example code.\n```js\n{ name: 'exampleModule' }\n```\n\n### `inject`\nFunction which can be used to inject dependencies.\n\n```js\n// Executes the function with the dependencies injected.\ninject((moduleA, moduleB) => {\n  moduleA.doSomething();\n  moduleB.doSomethingElse();\n});\n```\n","maintainers":[{"name":"aantthony","email":"hi@af.id.au"}],"time":{"modified":"2022-04-04T10:55:12.370Z","created":"2017-12-04T11:18:13.775Z","1.0.0":"2017-12-04T11:18:13.775Z","2.0.0":"2018-05-24T06:37:56.840Z","3.0.0":"2018-08-10T03:08:31.968Z","3.0.1":"2018-08-10T03:11:20.282Z","3.0.2":"2018-08-10T06:13:04.258Z"},"homepage":"https://github.com/aantthony/ioc#readme","repository":{"type":"git","url":"git+https://github.com/aantthony/ioc.git"},"author":{"name":"Anthony Foster"},"bugs":{"url":"https://github.com/aantthony/ioc/issues"},"license":"MIT","readmeFilename":"README.md"}