{"_id":"injector","_rev":"55-3810fbb12bc2a516fdaf9f4872aa6c26","name":"injector","description":"Dependency injection for Nodejs apps and unit testing.","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.6":{"name":"injector","version":"0.1.6","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"Inject.js\n","readmeFilename":"README.md","_id":"injector@0.1.6","dist":{"shasum":"feeb37bde300c1ad835edd010fd8ef91f78b6a8c","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.6.tgz","integrity":"sha512-g8XLPdcJbO6dn5U1MZlyos7E9SVuGMsgynbbSLUGWQryxNBiHOlO6pnV3Y/ADPARJZCoaWtT9VRen8Orb5jsyw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2nHaKzCTxOYabeU6rypiO5n8GX24CByQzid8ksYSPRAiEAoqFFtg0ffg22Y5xid7JBNyWTH7pceoITgBbFm4C8IXk="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.7":{"name":"injector","version":"0.1.7","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"Inject.js\n","readmeFilename":"README.md","_id":"injector@0.1.7","dist":{"shasum":"005e626412265b8e77e6905bfc0412e212bef83f","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.7.tgz","integrity":"sha512-bR1PC6Ldzx926HV/JoWIXhBxz5b82U3KgsTxLC56NKiRhq54q/olnYPU4sxRYBwBmOqlToVfX2ho+AGRUPglhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5l/lABJkNB6gpugnzFIp/8RPHeKRhThe/lEmQdQ/0jwIgPVEU8Bm9e+tDUKT5kRpbSc035Y/Vds759jvqtGyMvrM="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.8":{"name":"injector","version":"0.1.8","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: path.join(__dirname, 'modules'), // this would be ./modules\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n```\n\n\n### A Basic Module\n\nAll module files must start with a basic Nodejs ` module.exports ` and be housed within a ` funciton (app) {} `. The ` app ` variable is our injector object. From this, we can register our modules. A module export wil have no more and no less than the one argument ` app `.\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\nmodule.exports = function (app) {\n    \n    // Some basic private stuff here ...\n    \n    // Declare our module here\n    \n    app.module('SomeModule', function (ModuleToInject) {\n        \n        return {\n            someApiMethod: function () {\n                \n                console.log(ModuleToInject.value1);\n                \n            }\n        }\n    });\n    \n    // Modules can be functions, objects, or basic values\n    \n    app.module('ModuleToInject', {\n        value1: 'value1',\n        value2: 'value2'\n    });\n    \n};\n```\n\n## API\n\nThere are 2 available API methods for registering a module.\n\n### module(Name, Value)\n* **Name:** The name of our module\n* **Value:** The value of our module. This can be a function, an object, or a basic value (string, number, etc.)\n\n##### Example\n```javascript\n\n// Function module defintion\n\napp.module('SomeModule', function () {\n    // Do stuff here ...\n});\n\n// Object module definition\n\napp.module('SomeObjectModule', {\n    value1: 'value1'\n    // etc.\n});\n\n// Value module definition\n\napp.module('SomeValueModule', 'This sentence is useless ... maybe.');\n\n```\n\n* * *\n\n### constant(Name, Value)\n* **Name:** The name of our constant\n* **Value:** The value of our constant. This can be a function, an object, or a basic value (string, number, etc.), **BUT** constants cannot receive injected dependencies.\n\nConstants are basically simplified modules. The reason this is in the API is for readability. ` app.constant ` is only a modified wrapper on top of ` app.module `.\n\n##### Example\n```javascript\n\n// Basic constant difinition\n\napp.constant(PI, 3.14159);\n\n```\n","readmeFilename":"README.md","_id":"injector@0.1.8","dist":{"shasum":"3017c0b1f7df705028f356658cee7beefbce66d7","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.8.tgz","integrity":"sha512-Cz41BXm33d7zikUdID62QOE1/DtNV6vg6Cy3Sb3JN1a/OZOaPF9tyQcFbm9M4CAZ2k8tyWJsD7yQAH6LpGE4Yg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmQQLL6DLF9yDVGLqxbC0AfOQH6OcHH99zQtnB7s7CZAiA2ob5cQPKY5N4YbJJvdppDaG7AWRZnMmVJIVrBZFsaxg=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.9":{"name":"injector","version":"0.1.9","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: path.join(__dirname, 'modules'), // this would be ./modules\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n```\n\n\n### A Basic Module\n\nAll module files must start with a basic Nodejs ` module.exports ` and be housed within a ` funciton (app) {} `. The ` app ` variable is our injector object. From this, we can register our modules. A module export wil have no more and no less than the one argument ` app `.\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\nmodule.exports = function (app) {\n    \n    // Some basic private stuff here ...\n    \n    // Declare our module here\n    \n    app.module('SomeModule', function (ModuleToInject) {\n        \n        return {\n            someApiMethod: function () {\n                \n                console.log(ModuleToInject.value1);\n                \n            }\n        }\n    });\n    \n    // Modules can be functions, objects, or basic values\n    \n    app.module('ModuleToInject', {\n        value1: 'value1',\n        value2: 'value2'\n    });\n    \n};\n```\n\n## API\n\nThere are 2 available API methods for registering a module.\n\n### module(Name, Value)\n* **Name:** The name of our module\n* **Value:** The value of our module. This can be a function, an object, or a basic value (string, number, etc.)\n\n##### Example\n```javascript\n\n// Function module defintion\n\napp.module('SomeModule', function () {\n    // Do stuff here ...\n});\n\n// Object module definition\n\napp.module('SomeObjectModule', {\n    value1: 'value1'\n    // etc.\n});\n\n// Value module definition\n\napp.module('SomeValueModule', 'This sentence is useless ... maybe.');\n\n```\n\n* * *\n\n### constant(Name, Value)\n* **Name:** The name of our constant\n* **Value:** The value of our constant. This can be a function, an object, or a basic value (string, number, etc.), **BUT** constants cannot receive injected dependencies.\n\nConstants are basically simplified modules. The reason this is in the API is for readability. ` app.constant ` is only a modified wrapper on top of ` app.module `.\n\n##### Example\n```javascript\n\n// Basic constant difinition\n\napp.constant(PI, 3.14159);\n\n```\n","readmeFilename":"README.md","_id":"injector@0.1.9","dist":{"shasum":"d2f969b235e032fdfaec45927d8430333b4410d4","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.9.tgz","integrity":"sha512-xbFpaUSFf1lgWKu6sXuRtXlMXt2C6Fpbkpi9vbPMGfQ9G3wyq+QOizzn0etSY4RTTk8Y+PhJtyr0bHeIeRn+zw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICY9vwFJOFAOqrGksUts7vMl2PCVGtnJOdAVw0XW4BF2AiEAl1pNtJ8fTJfhv6irVN3l+9ndRjaOmjEdX9iEII41WWQ="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.10":{"name":"injector","version":"0.1.10","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: path.join(__dirname, 'modules'), // this would be ./modules\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n```\n\n\n### A Basic Module\n\nAll module files must start with a basic Nodejs ` module.exports ` and be housed within a ` funciton injector (app) {} `. The ` app ` variable is our injector object. From this, we can register our modules. A module export wil have no more and no less than the one argument ` app `.\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\nmodule.exports = injector function (app) {\n    \n    // Some basic private stuff here ...\n    \n    // Declare our module here\n    \n    app.module('SomeModule', function (ModuleToInject) {\n        \n        return {\n            someApiMethod: function () {\n                \n                console.log(ModuleToInject.value1);\n                \n            }\n        }\n    });\n    \n    // Modules can be functions, objects, or basic values\n    \n    app.module('ModuleToInject', {\n        value1: 'value1',\n        value2: 'value2'\n    });\n    \n};\n```\n\n## API\n\nThere are 2 available API methods for registering a module.\n\n### module(Name, Value)\n* **Name:** The name of our module\n* **Value:** The value of our module. This can be a function, an object, or a basic value (string, number, etc.)\n\n##### Example\n```javascript\n\n// Function module defintion\n\napp.module('SomeModule', function () {\n    // Do stuff here ...\n});\n\n// Object module definition\n\napp.module('SomeObjectModule', {\n    value1: 'value1'\n    // etc.\n});\n\n// Value module definition\n\napp.module('SomeValueModule', 'This sentence is useless ... maybe.');\n\n```\n\n* * *\n\n### constant(Name, Value)\n* **Name:** The name of our constant\n* **Value:** The value of our constant. This can be a function, an object, or a basic value (string, number, etc.), **BUT** constants cannot receive injected dependencies.\n\nConstants are basically simplified modules. The reason this is in the API is for readability. ` app.constant ` is only a modified wrapper on top of ` app.module `.\n\n##### Example\n```javascript\n\n// Basic constant difinition\n\napp.constant(PI, 3.14159);\n\n```\n","readmeFilename":"README.md","_id":"injector@0.1.10","dist":{"shasum":"397c8f7bda443fe62c3ba30e4b9dba142871fcc5","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.10.tgz","integrity":"sha512-hoVqIy808Rp39oeKodZO9wKQE/SkHNhHZ7fQPLt6wwjol4ASFjBUcLmTbXInNO5155Q9AcQQ/36FiE/h+sEOUg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9XemO7pgq4/TA0JyQGZFTwC0CelCzmwDKy30bR8vmtgIhALvwH+7v12N2GGCy+NDly76MUGZs/ktJjMj0vZQKoGbe"}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.11":{"name":"injector","version":"0.1.11","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: path.join(__dirname, 'modules'), // this would be ./modules\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n```\n\n\n### A Basic Module\n\nAll module files must start with a basic Nodejs ` module.exports ` and be housed within a ` funciton injector (app) {} `. The ` app ` variable is our injector object. From this, we can register our modules. A module export wil have no more and no less than the one argument ` app `.\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\nmodule.exports = injector function (app) {\n    \n    // Some basic private stuff here ...\n    \n    // Declare our module here\n    \n    app.module('SomeModule', function (ModuleToInject) {\n        \n        return {\n            someApiMethod: function () {\n                \n                console.log(ModuleToInject.value1);\n                \n            }\n        }\n    });\n    \n    // Modules can be functions, objects, or basic values\n    \n    app.module('ModuleToInject', {\n        value1: 'value1',\n        value2: 'value2'\n    });\n    \n};\n```\n\n## API\n\nThere are 2 available API methods for registering a module.\n\n### module(Name, Value)\n* **Name:** The name of our module\n* **Value:** The value of our module. This can be a function, an object, or a basic value (string, number, etc.)\n\n##### Example\n```javascript\n\n// Function module defintion\n\napp.module('SomeModule', function () {\n    // Do stuff here ...\n});\n\n// Object module definition\n\napp.module('SomeObjectModule', {\n    value1: 'value1'\n    // etc.\n});\n\n// Value module definition\n\napp.module('SomeValueModule', 'This sentence is useless ... maybe.');\n\n```\n\n* * *\n\n### constant(Name, Value)\n* **Name:** The name of our constant\n* **Value:** The value of our constant. This can be a function, an object, or a basic value (string, number, etc.), **BUT** constants cannot receive injected dependencies.\n\nConstants are basically simplified modules. The reason this is in the API is for readability. ` app.constant ` is only a modified wrapper on top of ` app.module `.\n\n##### Example\n```javascript\n\n// Basic constant difinition\n\napp.constant(PI, 3.14159);\n\n```\n","readmeFilename":"README.md","_id":"injector@0.1.11","dist":{"shasum":"31281be09eb2fa4bd53ca41d5723db03cfeb0daa","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.11.tgz","integrity":"sha512-SriwuhEEVzyG/uxbdW7HUDWpg31x5rZn4xEutXlKOW0HIkB39mbwbY6qcuTV0j8bEyB5ZAZU/ElNyjoN9Ucx6Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCzkumRBQzOjwCp23Cy7aieNPqumfflSqdGUu997aMXEwIgb0S+dWhnfxh5HojqKJ52cbGiojqukWI+vsb9JOeqe9Q="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.1.12":{"name":"injector","version":"0.1.12","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.1.12**\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: path.join(__dirname, 'modules'), // this would be ./modules\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n```\n\n\n### A Basic Module\n\nAll module files must start with a basic Nodejs ` module.exports ` and be housed within a ` function injector (app) {} `. The ` app ` variable is our injector object. From this, we can register our modules. A module export wil have no more and no less than the one argument ` app `.\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\nmodule.exports = function injector (app) {\n    \n    // Some basic private stuff here ...\n    \n    // Declare our module here\n    \n    app.module('SomeModule', function (ModuleToInject) {\n        \n        return {\n            someApiMethod: function () {\n                \n                console.log(ModuleToInject.value1);\n                \n            }\n        }\n    });\n    \n    // Modules can be functions, objects, or basic values\n    \n    app.module('ModuleToInject', {\n        value1: 'value1',\n        value2: 'value2'\n    });\n    \n};\n```\n\n## API\n\nThere are 2 available API methods for registering a module.\n\n### module(Name, Value)\n* **Name:** The name of our module\n* **Value:** The value of our module. This can be a function, an object, or a basic value (string, number, etc.)\n\n##### Example\n```javascript\n\n// Function module defintion\n\napp.module('SomeModule', function () {\n    // Do stuff here ...\n});\n\n// Object module definition\n\napp.module('SomeObjectModule', {\n    value1: 'value1'\n    // etc.\n});\n\n// Value module definition\n\napp.module('SomeValueModule', 'This sentence is useless ... maybe.');\n\n```\n\n* * *\n\n### constant(Name, Value)\n* **Name:** The name of our constant\n* **Value:** The value of our constant. This can be a function, an object, or a basic value (string, number, etc.), **BUT** constants cannot receive injected dependencies.\n\nConstants are basically simplified modules. The reason this is in the API is for readability. ` app.constant ` is only a modified wrapper on top of ` app.module `.\n\n##### Example\n```javascript\n\n// Basic constant difinition\n\napp.constant(PI, 3.14159);\n\n```\n","readmeFilename":"README.md","_id":"injector@0.1.12","dist":{"shasum":"4dfbb61a123f2532b6f4c2a1c9ac8fb037a7e4f0","tarball":"https://registry.npmjs.org/injector/-/injector-0.1.12.tgz","integrity":"sha512-9nNdMzuU4nS03rfhSPo0pFvB95zUtkdqYc66m2Qipv5aA6WC2viPkuYsvzxOQCWDBR0hp6aJKvoKBVYfFUVo0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHBt7u/U/TIScqLWDCstOHSwF2zXT150aa0eLmDxGyeOAiEA/RJYpJFZ8OE7bIsPbQeydHgbouLP0HjTXfq3uQ7/dho="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.0":{"name":"injector","version":"0.2.0","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1","async":"~0.2.5"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.1.12**\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    include: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n}, function (err, modules) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```","readmeFilename":"README.md","_id":"injector@0.2.0","dist":{"shasum":"28dc6977a3e8b1b071553469f1a9d5045840869c","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.0.tgz","integrity":"sha512-pfD1Dfp6O8DXpF/dQtC1HE2yb0pJD1IjMgRB9PTsiWv2eHWNdNWf+VEB0Wj1ULF3WyyS8EJ+asZC+pXkRJU6+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHuN3Fz52rz1rnF/wFZCSXFi11SzpGRIHToo9P2KEpPXAiBEjfNY01LI0jtaVbKvQfGLWlWYWuJLCXCUSROcy9BYCQ=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.5":{"name":"injector","version":"0.2.5","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"~2.2.1","async":"~0.2.5","chai":"~1.5.0","mocha":"~1.8.1"},"script":{"test":"make test"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.5**\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    include: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n}, function (err, modules) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.5","dist":{"shasum":"9c558cf51c5104b0d1d090a3955254b1e4819908","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.5.tgz","integrity":"sha512-ftemxIDWsaZZykzHwLjujdWqZ30aDGu543hxjekt6RTHS3LlPUbMITPlvoXo0LJ7ozW4uxl7Q8Igm9udEY3KJA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC8puZHAA9ZZoaRakVQb5XGi0By5QT0u9Kfq1V8zp3KqAiEAvjNFRnhVr+/8FuRW7oejoc6qors1sMKf1T8L82PnTwM="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.6":{"name":"injector","version":"0.2.6","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"2.2.x","async":"0.2.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"script":{"test":"make test"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.6**\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = Injector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    include: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n}, function (err, modules) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.6","dist":{"shasum":"b2742ff9b0a0abb9ee5de554150973a18a554978","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.6.tgz","integrity":"sha512-VrF16lh33q8HLVHr5HDueQRO1WErNBimB8mpl/Djx3dboRDC+Zyv2fDrrErOknBOJyZM0XfrKesbV8Cs8m9PWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIQC5z8yYBajXLI1XMHUX/mfOl7/ljyub2PoldbiXDtvD+wIfNwPAojj8xZLMmw3DfSYLtvMSa0r3f8fgneJauFjQLA=="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.7":{"name":"injector","version":"0.2.7","main":"injector.js","description":"Basic dependency injection for Nodejs.","dependencies":{"walk":"2.2.x","async":"0.2.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"script":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nBasic dependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.7**\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.7","dist":{"shasum":"8e4abd9bbdb5fa14520aa2ee65b7db8bb8cdd60c","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.7.tgz","integrity":"sha512-2M7zfwKjykKw/I1CDW77RLf1JQDrdfqCSZ31pWkX8jLs5lYP25sT9w/W9TBh/LRkmN7urjVgcGLzc49r4JjSbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/ZHFXRhz+EUop7Fyb+EMBwO8aYnrqE0BaHN0MNevUDQIgHqvjM5i2lUL2/h8G25spYxMrptcAuAzWwG5NnHzU2G4="}]},"_npmVersion":"1.1.69","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.8":{"name":"injector","version":"0.2.8","main":"injector.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.2.x","async":"0.2.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.8**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.8","dist":{"shasum":"1704079055ab7c5189ee90fa4209cdd4a5af06d8","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.8.tgz","integrity":"sha512-Ik7HtGqDzKizQKmUksEfIvemsZskbUWtBW//WG0MMTveRXvc4mvKxYQCfK+vQKz0FqUcOp9tTib6BS6SSInhDw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDt2XiBfiaMa81WAbMvTQTDxhLqCT9g/7p8SGl9BWOK3gIhAJ02Enr7twxqbeTQoFhKQbGlYGIxgBMvndLe13G/039O"}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.9":{"name":"injector","version":"0.2.9","main":"injector.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.9**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.9","dist":{"shasum":"620b1b1d60e8c845525a146864b63db68f0e4277","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.9.tgz","integrity":"sha512-wJu6bYWaIe8885cFSIVjUDqROEC4FrVptxDtRf7JcDJ2WVNUSdnQxXmw3basrmY6u/vhi+NeoELKEgtq1kX9TQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGoGMY28wTI8Y820lQSeryZS020sR90ruMy60nCo59GtAiAvLSYVMgnrvWUkVO7izpFPd8Lap+MaMu1HENrrJ206kw=="}]},"_from":".","_npmVersion":"1.2.11","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.2.10":{"name":"injector","version":"0.2.10","main":"injector.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.2.10**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n","readmeFilename":"README.md","_id":"injector@0.2.10","dist":{"shasum":"6131a1a22291cc8c2fc8a9bc51f86710059f3c00","tarball":"https://registry.npmjs.org/injector/-/injector-0.2.10.tgz","integrity":"sha512-JqT7DN25V+AHOpU59BtqAXCS1+bvWXtYLApULHCRc93OvlCsPEo2MWewzE1lGMA2bAk89BKze+w3YvUCzgmBcA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdWQn+jEWiPbM6Bbo5JoIjWd9gCch5mw9YVGNpN65lKAiAwrWE8jSjHqqX8H+lGLGshtzLMJNz9EUq/F0eVUS0z8g=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.1":{"name":"injector","version":"0.3.1","main":"injector.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"~0.3.0"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.3.1**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n\n## Run tests\n\n```\nnpm test\n```\n","readmeFilename":"README.md","_id":"injector@0.3.1","dist":{"shasum":"9fb22066ed6687ceacb786db637eaa2563563976","tarball":"https://registry.npmjs.org/injector/-/injector-0.3.1.tgz","integrity":"sha512-r6u5vy4qE74athNnNffBkSX/OrhbNTgslFNLakrEhQt0jrBEUgng7o2DsMBiGP8moo2Tc56ZKYfoEwPRUIamJg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDC5XiIaSjnEnjbddCe+K29ulFBhLC17fsoe3npnRqRbwIgQ4e6/M3yFOwf7suve/BxTLtlAUjDDE4ZJbTGvEltj9M="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.2":{"name":"injector","version":"0.3.2","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"~0.3.0"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.3.2**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n#####Option 1#####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n#####Option 2 #####\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nvar app = new Injector('OurApplication', {\n    \n    // These are the directories where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n});\n\n// Bootstrap our application\n\napp.bootstrap(function (err, modules) {\n    // Callback code goes here\n});\n\n```\n\n* * *\n\n### A Module\n\nTo declare an injectable module, the file must start with `// inject`. This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`.\n\nA module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n\n## Run tests\n\n```\nnpm test\n```\n","readmeFilename":"README.md","_id":"injector@0.3.2","dist":{"shasum":"77200b97fa28e9db905dadd3417b68065f175bbf","tarball":"https://registry.npmjs.org/injector/-/injector-0.3.2.tgz","integrity":"sha512-qK9p43WH4VhMBecae8wXAkf/Xh95CNc89ArcDLsv+taxwd3mwLVEE9Sdt8IRY/yZZK3+cOe4KVKGE+CwT2wxww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmZuWnXmVYl5aEvoKsiVkGHPbEKLMPn67WVn/vP4/WzAIgG1HZ1qHQqy+Lms+OufN4RoXEv9JjT+cckQfGawcJPEc="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.3":{"name":"injector","version":"0.3.3","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"~0.3.0"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.3.3**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector --save\n```\n\n## Usage\n\n### Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\n\nvar Injector = require('injector');\nvar path = require('path');\n\n// Set up our application\n\nInjector.create('OurApplication', {\n    \n    // This is the directory where are modules will live\n  \n    directory: [\n        path.join(__dirname, 'modules'), // this would be ./modules\n        path.join(__dirname, 'testing') // this would be ./testing\n    ],\n    \n    // This is an array of all directories to ignore\n    \n    exclude: ['modules/models'] // this would be ./modules/models (OPTIONAL)\n}, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n### Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` #inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n```javascript\n\n// inject\n\n// Function with dependency\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n\n// Object\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n\n// String\n\nexports.SOME_CONSTANT = 'some value';\n\n// etc.\n\n\n```\n\n## Run tests\n\n```\nnpm test\n```\n","readmeFilename":"README.md","_id":"injector@0.3.3","dist":{"shasum":"95369025630f6a1f1043dd249c64aa00765d777e","tarball":"https://registry.npmjs.org/injector/-/injector-0.3.3.tgz","integrity":"sha512-/9TmaHZt4HLMriC/a36XoM9XIMVBj0t+APuxfXAkjH0fOqQzwmPTRtBIz5K4num6KBE9MXcQ2H37e6CbxRcCkg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJQOi8IUjZ175aMdwP5mx0gZ4jv4cjuDc26+UDNEty1AiBhcEMSzmg2wHzMwyhNqoBD/TIKzY9tvwPJbLBrk+rhiQ=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.4":{"name":"injector","version":"0.3.4","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"~0.3.0"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDependency injection for Nodejs.\n\nAnd when I say basic, I mean basic. The idea with building this module was to create an open, flexible module system and not enforce new structures and coding styles.\n\nCurrent Version: **0.3.4**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Installation\n\n```\nnpm install injector --save\n```\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` #inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n","readmeFilename":"README.md","_id":"injector@0.3.4","dist":{"shasum":"a7a533c57ba5376e11762e2047fdade53ae9d410","tarball":"https://registry.npmjs.org/injector/-/injector-0.3.4.tgz","integrity":"sha512-0JN+INLixs58Qg++eEd//y4pTzN5fZ9tdnUPmnBUVNtjVvaT5ACd7YTYrlBt6gU1UojmNAM66RkfTH2b1E0M3g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdfxLADh82GwHYjM3POAwjlWCStGyrdEECVRQmpjD4CwIgVjKGleLQ+Ch4K7rS2x1QAVoLoVmq4FChCWI9b14d+gY="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.3.5":{"name":"injector","version":"0.3.5","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.3.5**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Installation\n\n```\nnpm install injector --save\n```\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n","readmeFilename":"README.md","_id":"injector@0.3.5","dist":{"shasum":"e69c2020887e479c5231ec290bc5786a85c9e8e0","tarball":"https://registry.npmjs.org/injector/-/injector-0.3.5.tgz","integrity":"sha512-VxtBgoPd3H5kpdW0sJE2UKkWgIRiSWVFTv88bEQ/EsqLgulNsspT60w9GJ16voYX5T/XRsbkPibwS5rnPp9RBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcEZLC9da9+PGEWy6Jt/9aueGlvSQdN9QnHAACjek6gAIhAKOSySthg8QS5nAIzlhSrWvArXJ/WqdVym1SKtNm3lBs"}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.4.0":{"name":"injector","version":"0.4.0","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.4.0**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Installation\n\n```\nnpm install injector --save\n```\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (SomeDependency) {\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","_id":"injector@0.4.0","dist":{"shasum":"79a8db2a1f7f0ec8ca70172a3f9a1ec5e6b19b02","tarball":"https://registry.npmjs.org/injector/-/injector-0.4.0.tgz","integrity":"sha512-PhKPm3Rsm31dRAhVgzgPF++7WmmVwfW1WeiqHHaMCUh4UElqCnXXWd5SBDFf38vEVToGhBdPhFEafoKXrxEnZw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH8uVBy8I3TlAJhogyzq2uDM+JxtFcbvQnx3SdsoZuonAiAOWQlwGYlVddWwsB+A/n/7DcLqhM8zaUt8DW9gDyR5Mg=="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.4.2":{"name":"injector","version":"0.4.2","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.4.2**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.4.2","dist":{"shasum":"b093e90927764cf1f778f68558443cf97bfcd01f","tarball":"https://registry.npmjs.org/injector/-/injector-0.4.2.tgz","integrity":"sha512-CxKI0texd4xxT834UIqnkkefEBPYWdKSpcn6W1YgzCMcMi6W6oU73M8yDmiOV4JamqLgSXPkKJ32xeYSXpVHCw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVJ6DTvd1wwjVyX/jWmww9UmaQZWLLDqOBvnX2tdp5FgIhANUIRbJiUOYta0yyUJL1Srr0RUb/roi7XzLJxB+w4XZn"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.4.3":{"name":"injector","version":"0.4.3","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.4.3**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    // Callback code goes here\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.4.3\n* FIXED: Refactored loading internal core modules. Exciting for future features!\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.4.3","dist":{"shasum":"14e6cbc9170b8cdf627a3cc1deb5e66abb16b80e","tarball":"https://registry.npmjs.org/injector/-/injector-0.4.3.tgz","integrity":"sha512-98LuPL1VxZk6CM7mj4LUX0jhhYlAH13Gm1xxfDWqNQCiGQkhuprB0BdVx5sSLLtu4butxlS3zTfy80uhrb2/Ww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIANU2vnJWT6pib0pLMw96HXQGxZCMm5LXYMnVETkbD+UAiEAg6yTY/el1wgldY6BQX0RCQ93kXtNJmKkxjEJA5QRF8c="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.4.4":{"name":"injector","version":"0.4.4","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.4.4**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    //\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.4.4\n* NEW: Manually inject a module from the injector instance variable with ` injector.inject(moduleName) `\n\n### 0.4.3\n* FIXED: Refactored loading internal core modules. Exciting for future features!\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.4.4","dist":{"shasum":"bc6c76656b4f59fff4311b96dc6d39d404267e6a","tarball":"https://registry.npmjs.org/injector/-/injector-0.4.4.tgz","integrity":"sha512-7mkN5VWkq0xQkngVxccVrX7QMy0iomMJy+iEdQhhuBZyZk5R+tq9pePJ02s+EC+yomY4X8ejdp71w5U+rSe/JA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDKO9eEZVEuxv+b10nKOMclNRGFhu7uo5Bdj6Px80mgCAiBv8y6VZcWYDMdG9l+rr0UqndvaaSQiIzlj1EXKh91GoA=="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.4.5":{"name":"injector","version":"0.4.5","main":"index.js","description":"Dependency injection for Nodejs.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.4.5**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    //\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Run tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.4.5\n* FIXED: Modules using the ` inject ` method exploded if dependency had not been bootstrapped.\n\n### 0.4.4\n* NEW: Manually inject a module from the injector instance variable with ` injector.inject(moduleName) `\n\n### 0.4.3\n* FIXED: Refactored loading internal core modules. Exciting for future features!\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.4.5","dist":{"shasum":"9594a42a57fc4806d8cbe75b6b43658c42d4192c","tarball":"https://registry.npmjs.org/injector/-/injector-0.4.5.tgz","integrity":"sha512-ydA9Qsh2q/XbLCMufKHOcfMC+sQmrn4+VVOevUtCe2ztVtnEtor+faVpk7z+pHWiApWHQDmdXFKxA+C47itB+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICKyHysXp5u9LeYy8eblUogqA01sE1EatsVmjSbI4tVKAiEAyfTMK5zkYcfdB6YZ3negrTIBzhwtFIp9QnKMOsjQHSY="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.5.0":{"name":"injector","version":"0.5.0","main":"index.js","description":"Dependency injection for Nodejs apps and testing.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.5.0**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    //\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n* **mock** - (OPTIONAL) an object whose keys are module names and values are mocked definitions to override the original module definition. Most likely used for writing unit tests. See [Writing unit tests with Injector](https://github.com/scottcorgan/Injector#writing-unit-tests-with-injector) for an example of how to mock injector dependencies.\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Writing unit tests with **Injector**\n\nThe whole point of dependency injection, especially with Injector, is to create a MUCH easier and reliable way to write tests around your code.\n\nInjector makes TDD (Test Driven Development) very easy by allowing you to mock dependencies through the Injector instance. See the following example for a how-to:\n\n```javascript\n\nvar Injector = require('injector');\n\n// Inject are app\nInjector.create('AppName', {\n    directory: 'someDirectory',\n    \n    // Here's where you mock dependencies.\n    // Just use the dependency's name and redefine it.\n    // You can even use dependency injection in the mocks.\n    mock: {\n        SomeModuleToMock: function (fs) {\n            return function () {\n                // Module logic here\n                return fs;\n            }\n        }\n    }\n}, function (err, injector) {\n    // App injected\n});\n\n```\n\nNow that we've mocked the module ` SomeModuleToMock `, wherever it's injected into other modules, the mock will be injected instead of the original module definition. This is incredibly useful for avoiding network requests or database writes while running your unit tests.\n\nAn example of where you might use this would be with a [Redis](https://github.com/mranney/node_redis) connection. Instead of actually connecting to a Redis client, you can mock out Redis to load the module [fakeredis](https://github.com/hdachev/fakeredis). Now writing unit tests around Redis interactions becomes far less painful and reduces the time it takes to run the tests.\n\n## Run **Injector's** tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.5.0\n* NEW: [Inject mocked dependencies](https://github.com/scottcorgan/Injector#writing-unit-tests-with-injector). Makes unit testing your code a breeze!\n* FIXED: More reliable manual dependency injection using ` inject `\n\n### 0.4.5\n* FIXED: Modules using the ` inject ` method exploded if dependency had not been bootstrapped.\n\n### 0.4.4\n* NEW: Manually inject a module from the injector instance variable with ` injector.inject(moduleName) `\n\n### 0.4.3\n* FIXED: Refactored loading internal core modules. Exciting for future features!\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.5.0","dist":{"shasum":"82df9657414edbde5375f0189c3b6333c82078c1","tarball":"https://registry.npmjs.org/injector/-/injector-0.5.0.tgz","integrity":"sha512-6zqws/8KPSaYFdtRgm9yPdksG77PEY7hb2ilYKw9KqHd6mDTxRW1WGo8WRgy4ZqJPLamWWjLMc5uFJ8BT+E/0Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4SOrEQqTJSoGNIwcAbYaVUTRafxTOaNsZKy+/n4i7NQIhAI4ZSVySNkfB7F1RANZ4Fpsou+in8Z+9nTN2xQHB6XeQ"}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]},"0.5.1":{"name":"injector","version":"0.5.1","main":"index.js","description":"Dependency injection for Nodejs apps and unit testing.","dependencies":{"walk":"2.x.x","async":"0.2.x","args-list":"0.3.x"},"devDependencies":{"chai":"1.5.x","mocha":"1.8.x"},"scripts":{"test":"./node_modules/.bin/mocha -u tdd --reporter spec"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"},"readme":"# Injector\n\nDirectory-independent dependency injection for Nodejs.\n\nThe idea behind this module is an open, flexible, directory-independent module system that does not enforce new coding styles foreign to Nodejs.\n\nCurrent Version: **0.5.1**\n\n[![Build Status](https://travis-ci.org/scottcorgan/Injector.png)](https://travis-ci.org/scottcorgan/Injector)\n\n## Example\n\nIf you need an example to help you get started, I've created a small and easy example of most of the features of Injector.\n\n[View the example of a working injector app](https://github.com/scottcorgan/Injector/tree/master/example)\n\n## Install\n\n[![NPM](https://nodei.co/npm/injector.png)](https://nodei.co/npm/injector/)\n\n## Setup\n\nThis is where the application is set up (or bootstrapped). It is most likely going to exist before any kind of server or database connection.\n\n```javascript\n\n// Require modules\nvar Injector = require('injector');\n\n// Injector config\nvar config = {\n    directory: [ 'some/module/directory' ],\n    exclude: [ 'some/other/directory' ] // (OPTIONAL)\n};\n\n// Set up our application\nInjector.create('ApplicationName', config, function (err, injector) {\n    //\n});\n```\n\n## Configuration\n\n* **directory** - a list of directories to use to look for injector modules (string or array)\n* **exclude** - (OPTIONAL) a list of directories to ignore when looking for injector modules\n* **mock** - (OPTIONAL) an object whose keys are module names and values are mocked definitions to override the original module definition. Most likely used for writing unit tests. See [Writing unit tests with Injector](https://github.com/scottcorgan/Injector#writing-unit-tests-with-injector) for an example of how to mock injector dependencies.\n\n## Modules\n\nTo declare an injectable module, the file must start with `// inject` (or ` # inject ` for Coffeescript). This is how the file is declared injectable.\n\nAnything following that should be declared with the Nodejs convention `exports.SomeModuleName = function () {}`. A module may be declared as a **String, Object, Array, or Function** (see below).\n\nA module in a module file will only be bootstrapped if in the folder specified in the ` directory: ` value *(See [Setup](https://github.com/scottcorgan/Injector/blob/master/README.md#setup))*.\n\n#### Function\n\n```javascript\n// inject\n\nexports.SomeModule = function (inject, SomeDependency) {\n    \n    // Injector now provides the 'inject' method, allowing\n    // you to inject core modules, npm modules, or injector\n    // modules.\n    var fs = inject('fs');\n    \n    // Module logic goes here\n    // Return anything you want public facing\n    \n    someDependency(); // outputs 'Yo!'\n};\n\nexports.SomeDependency = function () {\n    return 'Yo!';\n}\n```\n\n#### Object\n\n```javascript\n// inject\n\nexports.AnyName = {\n    someKey: 'some value'\n};\n```\n\n#### String\n\n```javascript\n// inject\n\nexports.SOME_CONSTANT = 'some value';\n```\n\n## Writing unit tests with **Injector**\n\nThe whole point of dependency injection, especially with Injector, is to create a MUCH easier and reliable way to write tests around your code.\n\nInjector makes TDD (Test Driven Development) very easy by allowing you to mock dependencies through the Injector instance. See the following example for a how-to:\n\n```javascript\n\nvar Injector = require('injector');\n\n// Inject are app\nInjector.create('AppName', {\n    directory: 'someDirectory',\n    \n    // Here's where you mock dependencies.\n    // Just use the dependency's name and redefine it.\n    // You can even use dependency injection in the mocks.\n    mock: {\n        SomeModuleToMock: function (fs) {\n            return function () {\n                // Module logic here\n                return fs;\n            }\n        }\n    }\n}, function (err, injector) {\n    // App injected\n});\n\n```\n\nNow that we've mocked the module ` SomeModuleToMock `, wherever it's injected into other modules, the mock will be injected instead of the original module definition. This is incredibly useful for avoiding network requests or database writes while running your unit tests.\n\nAn example of where you might use this would be with a [Redis](https://github.com/mranney/node_redis) connection. Instead of actually connecting to a Redis client, you can mock out Redis to load the module [fakeredis](https://github.com/hdachev/fakeredis). Now writing unit tests around Redis interactions becomes far less painful and reduces the time it takes to run the tests.\n\n## Run **Injector's** tests\n\n```\nnpm test\n```\n\n## Changelog\n\n### 0.5.1\n* FIXED: Mocking dependencies now works with core and npm modules (i.e. async, path, fs, etc.).\n\n### 0.5.0\n* NEW: [Inject mocked dependencies](https://github.com/scottcorgan/Injector#writing-unit-tests-with-injector). Makes unit testing your code a breeze!\n* FIXED: More reliable manual dependency injection using ` inject `\n\n### 0.4.5\n* FIXED: Modules using the ` inject ` method exploded if dependency had not been bootstrapped.\n\n### 0.4.4\n* NEW: Manually inject a module from the injector instance variable with ` injector.inject(moduleName) `\n\n### 0.4.3\n* FIXED: Refactored loading internal core modules. Exciting for future features!\n\n### 0.4.2\n* NEW: ` inject() ` method available for a more commonjs approach. See *examples* for usage.\n* FIXED: Breaking tests. Better coverage\n\n### 0.4.0\n* NEW: Npm modules in *node_modules* directory are now injectable like a normal Injector module. No need to call ` require('') ` in any module now.\n* NEW: Using ` /* inject */ ` now also declares a file has having an injectable module\n* NEW: define one OR multiple module directories\n* FIXED: error with invalid directory type (object, function, etc). Only strings or arrays are allowed\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/scottcorgan/injector/issues"},"_id":"injector@0.5.1","dist":{"shasum":"d3446273c2ddd9d362569a3307e9158393929156","tarball":"https://registry.npmjs.org/injector/-/injector-0.5.1.tgz","integrity":"sha512-8e0lOm+c+tpVaRveWDzjc7OoIf0j58Ngs8cbDhMIr0bAlvffQ/gHo0DVxK8MA8RmrDekP8zrjk89a8SxcYslTQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDof6fhuqTlZvt+mk93pSywTnRhjbF9WJegVg2LkAvQdAiEA2GVngUgDyNXadOv+XsO1v63cGAeGgh5K7AiG/llQhAU="}]},"_from":".","_npmVersion":"1.2.32","_npmUser":{"name":"scottcorgan","email":"scottcorgan@gmail.com"},"maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}]}},"readme":"Inject.js\n","maintainers":[{"name":"scottcorgan","email":"scottcorgan@gmail.com"}],"time":{"modified":"2022-06-19T01:20:08.590Z","created":"2013-02-09T01:11:02.662Z","0.1.6":"2013-02-09T01:11:03.351Z","0.1.7":"2013-02-09T01:13:43.137Z","0.1.8":"2013-02-09T17:30:10.862Z","0.1.9":"2013-02-09T20:47:51.610Z","0.1.10":"2013-02-09T20:54:09.379Z","0.1.11":"2013-02-09T21:13:21.718Z","0.1.12":"2013-02-11T21:07:01.183Z","0.2.0":"2013-02-12T23:32:07.983Z","0.2.5":"2013-02-14T01:51:32.253Z","0.2.6":"2013-02-14T02:06:42.358Z","0.2.7":"2013-02-16T00:20:13.666Z","0.2.8":"2013-02-18T15:52:23.847Z","0.2.9":"2013-02-26T22:02:04.761Z","0.2.10":"2013-04-12T01:06:21.852Z","0.3.1":"2013-04-13T16:02:42.963Z","0.3.2":"2013-04-13T16:08:39.568Z","0.3.3":"2013-04-20T17:15:26.707Z","0.3.4":"2013-04-24T16:06:11.071Z","0.3.5":"2013-04-25T15:07:31.266Z","0.4.0":"2013-04-25T20:50:09.384Z","0.4.2":"2013-09-19T19:02:18.123Z","0.4.3":"2013-09-19T21:13:21.455Z","0.4.4":"2013-09-20T00:08:28.842Z","0.4.5":"2013-09-24T17:13:04.357Z","0.5.0":"2013-09-25T01:15:26.499Z","0.5.1":"2013-09-25T02:39:59.903Z"},"repository":{"type":"git","url":"http://github.com/scottcorgan/injector.git"}}