{"_id":"consign","_rev":"43-b0b6c3bc90af6929d80bf1e5f3b76209","name":"consign","dist-tags":{"latest":"0.2.0"},"versions":{"1.0.0":{"name":"consign","version":"1.0.0","author":{"name":"Fergus Ruston","email":"fergus.ruston@gmail.com"},"license":"ISC","_id":"consign@1.0.0","maintainers":[{"name":"ergusto","email":"ergusto@gmail.com"}],"homepage":"https://github.com/ergusto/consign","bugs":{"url":"https://github.com/ergusto/consign/issues"},"dist":{"shasum":"6d53bc4c4ca320ed79d6b6cb731144e275480873","tarball":"https://registry.npmjs.org/consign/-/consign-1.0.0.tgz","integrity":"sha512-wSV6wNN9uVbc1mQXftwYc+LkrY1NtkIVjrzT+QwOblD9ZLQGaEw2vURmPhG4fEEGndmHCfcXTntYwL2IL3jgrg==","signatures":[{"sig":"MEUCIQDedh6UDdzEhSSYWNSreAZKXqRk+RxwXsZVDV71zuJhswIgWsRJOIRLeVqCXwaYAJqJF8NXjHwBHPLJieK1l+J7cjA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"6d53bc4c4ca320ed79d6b6cb731144e275480873","gitHead":"22502e2bbee85165f4ef3787e1976744798ade3f","scripts":{"build":"browserify index.js --standalone consign > build/consign.js","minify":"yuicompressor build/consign.js -o build/consign.min.js"},"_npmUser":{"name":"ergusto","email":"ergusto@gmail.com"},"repository":{"url":"https://github.com/ergusto/consign.git","type":"git"},"_npmVersion":"1.4.26","description":"dom event delegation","directories":{}},"1.0.1":{"name":"consign","version":"1.0.1","author":{"name":"Fergus Ruston","email":"fergus.ruston@gmail.com"},"license":"ISC","_id":"consign@1.0.1","maintainers":[{"name":"ergusto","email":"ergusto@gmail.com"}],"homepage":"https://github.com/ergusto/consign","bugs":{"url":"https://github.com/ergusto/consign/issues"},"dist":{"shasum":"ef0b98d9db075cdd3eeb59763f6aceedd13c5a63","tarball":"https://registry.npmjs.org/consign/-/consign-1.0.1.tgz","integrity":"sha512-YbiWyXWSTkgFv5NSrtc1n+fiNY2Gn+aQ69hSvHHo7YXb9f6xQyhniKJPvs4eRqN5GbE6j+eatBPi5pLpKw9ojA==","signatures":[{"sig":"MEYCIQCeZS2qrNBZfA9rONacPqL+hpiMquiU7gB179ptjoBlHwIhAPi3cn2kwy2Xdxp1lwk64BmCKvy6R9n2JWHW8EyCRUcC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"ef0b98d9db075cdd3eeb59763f6aceedd13c5a63","gitHead":"f13cc69ff7c6ef3cb5f2e8473232b0937df9eacf","scripts":{"build":"browserify index.js --standalone consign > build/consign.js","minify":"yuicompressor build/consign.js -o build/consign.min.js"},"_npmUser":{"name":"ergusto","email":"ergusto@gmail.com"},"repository":{"url":"https://github.com/ergusto/consign.git","type":"git"},"_npmVersion":"1.4.26","description":"dom event delegation","directories":{}},"1.0.2":{"name":"consign","version":"1.0.2","author":{"name":"Fergus Ruston","email":"fergus.ruston@gmail.com"},"license":"ISC","_id":"consign@1.0.2","maintainers":[{"name":"ergusto","email":"ergusto@gmail.com"}],"homepage":"https://github.com/ergusto/consign","bugs":{"url":"https://github.com/ergusto/consign/issues"},"dist":{"shasum":"3e78ca815bc59e2c64cf16da1a8769dc29481fa5","tarball":"https://registry.npmjs.org/consign/-/consign-1.0.2.tgz","integrity":"sha512-IyNtbYN6vlQFM6YCLru/07r4ECQqy6J9+SS2fb+TxFMpEZnOIWctOeGh1HA+dVNhl6lo1CyLPIUCSlF4Q3hWqw==","signatures":[{"sig":"MEUCIAIsoJRX/cLBjms1NzUKqNtx72GY1lJIfSUb4kr4mL9OAiEA/XDhqoVyJot0vFPOpYl7tZRWNCHbLpBsKgXdaopZETs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"3e78ca815bc59e2c64cf16da1a8769dc29481fa5","gitHead":"176389f992af22d8d1e3e46a20d399d2792d94a3","scripts":{"build":"browserify index.js --standalone consign > build/consign.js","minify":"yuicompressor build/consign.js -o build/consign.min.js"},"_npmUser":{"name":"ergusto","email":"ergusto@gmail.com"},"repository":{"url":"https://github.com/ergusto/consign.git","type":"git"},"_npmVersion":"1.4.26","description":"dom event delegation","directories":{}},"1.0.3":{"name":"consign","version":"1.0.3","author":{"name":"Fergus Ruston","email":"fergus.ruston@gmail.com"},"license":"ISC","_id":"consign@1.0.3","maintainers":[{"name":"ergusto","email":"ergusto@gmail.com"}],"homepage":"https://github.com/ergusto/consign","bugs":{"url":"https://github.com/ergusto/consign/issues"},"dist":{"shasum":"7bc9254afb4e530e8e176b3b6e2adb804244325b","tarball":"https://registry.npmjs.org/consign/-/consign-1.0.3.tgz","integrity":"sha512-n/yNOcPH6LHBXGvn4I7yZN6CizgAGIjL4wspWi+TundwWGXWv9t00MJ+StMNOflvFfeh2K7887feVyyJJRHFiA==","signatures":[{"sig":"MEYCIQCeu8TxHxWOPWseVX7m/K8NyiXU+DUEawzNPaH9SrfROwIhAM+MCu6FI94OmtFUkbUXgjTjWXJyYsG8YPhNwvV0ik2J","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"7bc9254afb4e530e8e176b3b6e2adb804244325b","gitHead":"327559f1b579b934579414c62950e1529e728c32","scripts":{"build":"browserify index.js --standalone consign > build/consign.js","minify":"yuicompressor build/consign.js -o build/consign.min.js"},"_npmUser":{"name":"ergusto","email":"ergusto@gmail.com"},"repository":{"url":"https://github.com/ergusto/consign.git","type":"git"},"_npmVersion":"1.4.26","description":"dom event delegation","directories":{}},"0.1.1":{"name":"consign","version":"0.1.1","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.1","maintainers":[{"name":"ergusto","email":"ergusto@gmail.com"},{"name":"jarradseers","email":"jarrad@jarradseers.com"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"362ce82ae9fea96d31ab5ec2d5093485717d632c","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.1.tgz","integrity":"sha512-fxCMWyPIMR+s5pl0mR4MSAUH42ZXw8wdF/WDXx39uDheIom8nCJc5YusiSYSDYXDgWratqCiTWAloQ5YX3VfGg==","signatures":[{"sig":"MEUCIQD0ApwmPc0qr9yxf0f9UV7pa0Vd2qhcXgYb2IFX4iR1sgIgZaRl/p9/jm7lrEVoW7BXGnTPyF/kYM4QT42IqKHDI98=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","_shasum":"362ce82ae9fea96d31ab5ec2d5093485717d632c","engines":{"node":"*"},"gitHead":"2858269baa1f1814f646259dce36430995066764","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@jarradseers.com"},"repository":{"url":"git://github.com/jarradseers/consign","type":"git"},"_npmVersion":"2.11.3","description":"Autoload your scripts.","directories":{},"_nodeVersion":"0.12.7","devDependencies":{"mocha":"^1.21.4"}},"0.1.2":{"name":"consign","version":"0.1.2","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.2","maintainers":[{"name":"jarradseers","email":"jarrad@jarradseers.com"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"768a31aa4e6a974a0330d647036c56cf13476dd4","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.2.tgz","integrity":"sha512-2sGCftbsdXoFzD5hrXa1uhBUbbZmU70UxoXum3Ssjf3f3T6Dvsu2ubaYi71BWB8GwvqtBBP27P9EtxBbohPQGg==","signatures":[{"sig":"MEUCIQCNRXivbKJYl3fxtX7xnR6DAM5+CUJwVvivHUJBRFVHMAIgJ90EpkXLQQIPWcTPOYA8AkB1fLYydMJ+o8yy7QyuFjE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","_shasum":"768a31aa4e6a974a0330d647036c56cf13476dd4","engines":{"node":"*"},"gitHead":"7c32acf9098886dfa9ace1ba7cb2a5c775fe3f48","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"repository":{"url":"git://github.com/jarradseers/consign","type":"git"},"_npmVersion":"1.4.28","description":"Autoload your scripts.","directories":{},"devDependencies":{"mocha":"^1.21.4","middleware-chain":"^1.0.1"}},"0.1.4":{"name":"consign","version":"0.1.4","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.4","maintainers":[{"name":"jarradseers","email":"jarrad@jarradseers.com"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign#readme","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"2deb0c3a40d670257f0792bd36b4d86e8c514c77","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.4.tgz","integrity":"sha512-k0i6eNY7mITTQMF7HGnqrJmcmCd5rrSgkQ1gtgv7N++QxvvQovHyHb9zTO8o8/Obhf59M23u0+uEAtNUAU3nJQ==","signatures":[{"sig":"MEUCIFxq0B22kZfWH4VNgkWvMzQcPLHda7/E0VH+8uvp1Z/CAiEA3wwnDdVPF1OcR1116LJQcAIFKM7Y2576U88ZVxaaJNc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","_from":".","_shasum":"2deb0c3a40d670257f0792bd36b4d86e8c514c77","engines":{"node":"*"},"gitHead":"d7427cf329aac35857b66b8fe88859b59928efb3","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"repository":{"url":"git://github.com/jarradseers/consign.git","type":"git"},"_npmVersion":"4.4.4","description":"Autoload your scripts.","directories":{},"_nodeVersion":"7.6.0","devDependencies":{"mocha":"^1.21.4","middleware-chain":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/consign-0.1.4.tgz_1491350252969_0.23046644707210362","host":"packages-12-west.internal.npmjs.com"}},"0.1.5":{"name":"consign","version":"0.1.5","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.5","maintainers":[{"name":"jarradseers","email":"jarrad@jarradseers.com"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign#readme","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"9d6b7a3ed8c1913d912b6e5feb3eeb5d87541429","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.5.tgz","integrity":"sha512-M9j7KpPtDK4ALiCS2iiKNq1oZ6OdUmf2em2mUF1b0p4hh/f7K+dxtbZHemU06wvGmbp7wdbSo2fOV8YCpMyjjQ==","signatures":[{"sig":"MEQCHyAEzPwUGl/BPYH8+Q/t8mF43NQdzxX1RNgV7mYWEhQCIQCUO/r0b8ItbjhJ7M9zNtvXG0YaC1uwWOdFZVCP0oHvdA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","engines":{"node":"*"},"gitHead":"a1c965f5b1609def0a24d9128f313f0300c89993","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"repository":{"url":"git://github.com/jarradseers/consign.git","type":"git"},"_npmVersion":"5.0.1","description":"Autoload your scripts.","directories":{},"_nodeVersion":"8.0.0","devDependencies":{"mocha":"^1.21.4","middleware-chain":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/consign-0.1.5.tgz_1496375074777_0.2183474232442677","host":"s3://npm-registry-packages"}},"0.1.6":{"name":"consign","version":"0.1.6","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.6","maintainers":[{"name":"jarradseers","email":"jarrad@jarradseers.com"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign#readme","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"5a9b3a60ba5d362a514841b0c633e584486a72d7","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.6.tgz","integrity":"sha512-Idlqa7N46rD6Odarx9qArbMpPrljc8DjV2DYH6uAFoOLITtuanhi2S/Z4LX4Jvg6+ef16Mjwwp5k5c5fMoOzIA==","signatures":[{"sig":"MEYCIQDeO259kENDgyOn06ufzK9Nru72ABDdi4EYeF7rRFQwbgIhAPj2jjKKQZOI2ShKmZAshuAa9stiC98+RmItsXDp1CZU","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index","engines":{"node":"*"},"gitHead":"08a32e9bcda582d5e5d47f299a25f31d36415202","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"repository":{"url":"git://github.com/jarradseers/consign.git","type":"git"},"_npmVersion":"5.0.3","description":"Autoload your scripts.","directories":{},"_nodeVersion":"8.0.0","devDependencies":{"mocha":"^1.21.4","middleware-chain":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/consign-0.1.6.tgz_1497822396441_0.25739898602478206","host":"s3://npm-registry-packages"}},"0.1.7":{"name":"consign","version":"0.1.7","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"_id":"consign@0.1.7","maintainers":[{"name":"jarradseers","email":"jarrad@seers.me"}],"contributors":[],"homepage":"https://github.com/jarradseers/consign#readme","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"85b74571142b11d026d0c884aafbebb4bcee9252","tarball":"https://registry.npmjs.org/consign/-/consign-0.1.7.tgz","fileCount":39,"integrity":"sha512-O8jk1ENCUqbyv8uhizuwx6sJ+oO0F4Yr39XOn8JMgOAHxFpbZJxux4MahWXPZr6x9cX18MpGfeFMIX9QsxbI3g==","signatures":[{"sig":"MEUCIECpReAtmml3TK0+s7KqPewBzHvOQ2HhDg09MM9GJMvdAiEAyM55jNaf5hWbYFJ5YAE26kxaDR7GQUB2V6ztZ34oxxE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIF5Kxx2ktg1F9qlkuIpX6sNU6pl62EdGL3ohQasWmLTDAiEAgf8fMAwK7lu64tDY1onG0qOLm0GDaLnTjUFiGR1e/WQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26346},"main":"index","engines":{"node":"*"},"gitHead":"dbbb540c072839acf735fadf42fa7dbfa689c7f7","scripts":{"test":"mocha"},"_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"repository":{"url":"git://github.com/jarradseers/consign.git","type":"git"},"_npmVersion":"10.8.2","description":"Autoload your scripts.","directories":{},"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.8.2","middleware-chain":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/consign_0.1.7_1791031541367_0.6738643838425595","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"consign@0.2.0","bugs":{"url":"https://github.com/jarradseers/consign/issues"},"dist":{"shasum":"cfc7738f52aa3aa02bdf398bb644cb7c0b22761d","tarball":"https://registry.npmjs.org/consign/-/consign-0.2.0.tgz","fileCount":12,"integrity":"sha512-ZB7vFCgDn5NyUaqEewgbUJPNvqXyQYbTgDockStUJUhJASbSEsoxTvgIz6MfuHytiJq60lA7q0F9ChaxhGgDqA==","signatures":[{"sig":"MEUCIQCrfePtJR9N7VCfQ/OTcXlufVTQjmRu/k4wMr6UxDNOcAIgcJu5Crmx57kawLG8xWo/MCtkr+JysAuxB1+rp5G7P8E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG54mlIt+JPKjM48QuFoOps8ghwqdwPXDAGznXWrTs09AiADUie9N+Q93xTUXblIz3OBK1nt1JrWwbld5o/lODcFDg=="}],"unpackedSize":15277},"main":"index.js","name":"consign","author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"engines":{"node":">=6.0.0"},"gitHead":"ac629dee2032e71bbe61431723fd67140494a24b","license":"MIT","scripts":{"lint":"eslint .","test":"eslint . && node --test test/tests.js"},"version":"0.2.0","_npmUser":{"name":"jarradseers","email":"jarrad@seers.me"},"homepage":"https://github.com/jarradseers/consign#readme","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"repository":{"url":"git+https://github.com/jarradseers/consign.git","type":"git"},"_npmVersion":"10.8.2","description":"Autoload your scripts.","directories":{},"maintainers":[{"name":"jarradseers","email":"jarrad@seers.me"}],"_nodeVersion":"20.20.2","_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.12.0","globals":"^17.13.0","@eslint/js":"^10.0.1","middleware-chain":"^1.0.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/consign_0.2.0_1791033304136_0.6369014328502882"}}},"time":{"created":"2014-12-01T22:35:27.761Z","modified":"2026-10-03T13:15:04.385Z","1.0.0":"2014-12-01T22:35:27.761Z","1.0.1":"2014-12-17T02:47:56.765Z","1.0.2":"2014-12-29T18:48:28.405Z","1.0.3":"2015-01-21T20:49:06.311Z","0.1.0":"2015-07-22T00:28:30.183Z","0.1.1":"2015-07-22T00:46:33.130Z","0.1.2":"2015-08-23T10:20:51.878Z","0.1.4":"2017-04-04T23:57:33.196Z","0.1.5":"2017-06-02T03:44:34.891Z","0.1.6":"2017-06-18T21:46:36.578Z","0.1.7":"2026-10-03T12:45:41.469Z","0.2.0":"2026-10-03T13:15:04.211Z"},"bugs":{"url":"https://github.com/jarradseers/consign/issues"},"author":{"name":"Jarrad Seers","email":"jarrad@seers.me"},"homepage":"https://github.com/jarradseers/consign#readme","keywords":["mvc","autoload","koa","express","express-load","auto-configure","configuration","consign","load","require"],"repository":{"url":"git+https://github.com/jarradseers/consign.git","type":"git"},"description":"Autoload your scripts.","maintainers":[{"name":"jarradseers","email":"jarrad@seers.me"}],"readme":"# Consign\n\n[![CI](https://github.com/jarradseers/consign/actions/workflows/ci.yml/badge.svg)](https://github.com/jarradseers/consign/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/consign.svg)](https://www.npmjs.com/package/consign)\n\nAutoload your scripts! _The successor to `express-load`._\n\nConsign makes applications easier to develop with logical file separation and automatic script loading. Use it to autoload models, routes, schemas, configs, controllers, object maps and so on. It has no dependencies.\n\nIf you are writing scripts and just need some structure, see [middleware-chain](https://github.com/jarradseers/middleware-chain); there is an example of the two together in the [examples](examples) folder.\n\n## Installation\n\n```bash\n$ npm install consign\n```\n\n## Usage\n\n```js\nconst consign = require('consign');\n\nconst app = {};\n\nconsign()\n  .include('models')\n  .then('controllers')\n  .into(app);\n\n// app.models.user\n// app.models.company\n// app.controllers.user\n// app.controllers.company\n```\n\nEach file is loaded with `require` and placed on the object under its path: `models/user.js` becomes `app.models.user`. Files are loaded in the order they were included, and files within a directory in alphabetical order.\n\nThere are more in the [examples](examples) and [test](test) folders.\n\n## API\n\n| Method | Description |\n|---|---|\n| `consign(options)` | Create a loader. See [Options](#options). |\n| `.include(entity)` | Add a file or directory, relative to `cwd`. Directories are added recursively. Several can be given in one string, separated by commas: `'models, controllers'`. |\n| `.exclude(entity)` | Remove a file or directory that was included. |\n| `.then(entity)` | Repeat the last operation, `include` or `exclude`, with another entity. |\n| `.into(object, ...args)` | Load the files onto the object. |\n\nAll of them return the loader, so calls can be chained.\n\nTo load one file before the rest of its directory, include it first; a file is only added once:\n\n```js\nconsign()\n  .include('models/base.js, models')\n  .into(app);\n```\n\n## What a script can export\n\n| Export | Result |\n|---|---|\n| A function | Called with the arguments given to `into`, so `into(app)` calls it with `app`. Its return value is stored. |\n| A class | Constructed with the same arguments. The instance is stored. |\n| Anything else | Stored as it is, including the contents of a `.json` file. |\n\nA transpiled module with a `default` export is treated as its default export.\n\n```js\n// models/user.js\nmodule.exports = function(app) {\n  return {\n    find: function() { /* ... */ }\n  };\n};\n```\n\n## Options\n\nThe optional options object is passed to the main `consign` function. These are the defaults:\n\n```js\nconsign({\n  cwd: process.cwd(),\n  locale: 'en-us',\n  logger: console,\n  verbose: true,\n  extensions: ['.js', '.json', '.node'],\n  ignore: null,\n  loggingType: 'info'\n});\n```\n\n### Base directory (cwd)\n\nConsign uses paths relative to your current working directory. When you do not want a parent directory in the object chain, set `cwd`:\n\n```js\nconsign()\n  .include('app') // ./app/controllers/user.js\n  .into(app);\n\n// app.app.controllers.user\n```\n\n```js\nconsign({cwd: 'app'})\n  .include('controllers') // ./app/controllers/user.js\n  .into(app);\n\n// app.controllers.user\n```\n\n### File extensions\n\nOnly files ending in `.js`, `.json` or `.node` are loaded. Anything you pass in `extensions` is added to that list; it does not replace it:\n\n```js\nconsign({extensions: ['.cjs']});\n```\n\nHidden files and directories, those starting with a dot, are always skipped.\n\n### Ignoring files\n\n`ignore` leaves files and directories out of an `include`. It is a regular expression, or a function returning `true` to ignore, tested against each path relative to `cwd`, with forward slashes:\n\n```js\nconsign({ignore: /\\.test\\.js$|__mocks__/})\n  .include('controllers')\n  .into(app);\n```\n\n### Logging\n\n| Option | Description |\n|---|---|\n| `verbose` | On by default; set to `false` for no logging. |\n| `logger` | Defaults to `console`. Any object with `info`, `log`, `warn` and `error` methods. |\n| `loggingType` | The logger method used for general messages; defaults to `info`. |\n| `locale` | Language of the log messages: `en-au`, `en-nz`, `en-us`, `fr-fr`, `pl`, `pt-br` or `zh-cn`. |\n\n## Errors\n\nAn entity that does not exist is logged and skipped. A file that fails to load makes `into` throw an `Error` naming the file, with the original error as its `cause`.\n\n## Upgrading from 0.1.x\n\n- Only `.js`, `.json` and `.node` files are loaded, as documented. In 0.1.x the list was not applied, so every file in an included directory was loaded, including editor backups such as `user.js~`. Add other extensions with the `extensions` option.\n- A module that exports a class is constructed rather than called.\n- A failed load throws an `Error` instead of a string.\n- Excluding a file that was not included no longer removes a different file.\n- A `cwd` whose name appears again later in a path no longer breaks the keys.\n\n## Tests\n\n```bash\n$ npm install\n$ npm test\n```\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","users":{"zaher":true,"begrossi":true,"hurerera":true,"jonathas":true,"philipjc":true,"rochejul":true,"eltonmelo":true,"firerishi":true,"igorissen":true,"slmcassio":true,"italosouza":true,"vicsandoli":true,"alanmarcell":true,"raisiqueira":true,"robquaresma":true,"vikingsteam":true,"lukaswilkeer":true,"destemidosistemas":true},"license":"MIT"}