{"_id":"law-connect","_rev":"26-4587fb3d74433d22384df8779eb3dd49","name":"law-connect","description":"Connect middleware for Law.","dist-tags":{"latest":"1.0.2"},"versions":{"0.0.1":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.1","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.1","dist":{"shasum":"3bc81b96d7ffd07b59963548305fa6da26e725a4","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.1.tgz","integrity":"sha512-5j50cs6i0mVqcyUbdWBdAElc8fuUMnnyzxuTck/EK5PzqrIYXMeYBwzrrw1sUcwaKgqaidVZ1/LLTtgjFdgczA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5J3V9UR3RMshjxdpTywxu0guDS8F4aqee2S4vdraeYQIgGw6Zj/3u1Q89SFIdrn9BgAQ6c0Exk8AvXkTYCEXwlg8="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.2":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.2","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.2","dist":{"shasum":"c0479d17fa9fe17b4ca0cb6902c7fbdb6fdb21e0","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.2.tgz","integrity":"sha512-+2dIfQ4JX63C6S/GtJ+0OWgV69SWQa78YYLwraODp15Kb96qKbd7ucc2asqiYg7jxZtPAaX/1v6n58WsPbtYmg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXoDlBMfzT1ef9NTNa1wOy/3OIFFUJBFdw73AcvKgplwIgPM2vGs4THe+amO7HA0I6pM/Hxw3LFJqdcbTI4lvJOtI="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.3":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.3","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.3","dist":{"shasum":"644bbf178b4a752489461cb719e197a467888a2a","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.3.tgz","integrity":"sha512-ee4tOJWVSmzKo8FNyQatXFXEr8MDoJHtSeR2e4EOi3cLcq5jtisyNa2821AaA3fpsN+pBHARmv237vxgrK3bNw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxg71U0vV3jRQR4UsCnG3vOMNryRsj9X7durdQ0+tu9QIgeV1y6tcAdEbu1o5TvCNb81KA5D8QI/0+84/KAAANe68="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.4":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.4","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.4","dist":{"shasum":"541520c0cf5a6e5fa7c47ae30f639ea0747249a3","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.4.tgz","integrity":"sha512-Xom9WHiGgbCUwprgB2l0+0zVMhu7kVkGKPN5JKWIPu42sMyvNlnRvT/Gyeyi5GnFlOimG0ZF8Bjk5upmlkLJQA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEJ4LRIUhIInHbSjqYoFz3FirkxRnk9ItNd+sL+0FsogAiEAoySanyJgGYuMJfvT3UhTsF/FuSj/QsNMMtJ7pcX5+TU="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.5":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.5","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.5","dist":{"shasum":"d99f1d8ee5b0e467fe13a187fd52918c3ad2d0e7","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.5.tgz","integrity":"sha512-SPJzY25gRD6PUd5jEpjvfjZXsIhe5sPfTcTyA4N1onpKslynnUUWrNWxsAPxNVliXriuKNdTtftSedTyzrg9JQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBSd6YAGXeURZkoP7vEDGgWB6l3qos6HYaDcMwPT+QWvAiEAievvogsGO/Dcnp84+62dPapp8K94W29oniPVw8BQ3xE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.6":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.6","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.6","dist":{"shasum":"d028426846392c9b7bd595a050a6cd1f0ceb2fec","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.6.tgz","integrity":"sha512-I0zifeATwrnaSZep38tHd6wvq8KYcqZbxZYCLgGdc1HXNhqdmZJhxzlDq7vAYrJgbKOH3nhU2IpVgZmotSZ37g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDK4G8m5ne7KmvAQJJhbAfh4W0Eg2O0H5/hPLdf6bQFOgIgXDRW2LaeonaTnVIwPWjGrHjAZn8SwScyGQpdnK0I45k="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.7":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.7","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.7","dist":{"shasum":"050daf7887471fb1f9763f9270765365208bff66","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.7.tgz","integrity":"sha512-AcxdCS+j/sji/I3WitGiMCwvc8Aj5CRE9uuvjNWxm67OXOf2Tx9EAWxS7HJhzTyLih2lo26TqMlRSPHLPa1kgA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCifA5RzbFu7QSuc9j2qHOHjsfpESmos/yLmWLdpOPbIQIhAOnIptXc7MlcbLi7MLZa1SmDk7Z4+Cq/mp4sZTltf9UO"}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"0.0.8":{"name":"law-connect","description":"Connect middleware for Law.","version":"0.0.8","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"coffee-script":"*","lodash":"*","routes":"*"},"devDependencies":{"mocha":"*","should":"*","connect":"*","request":"*","law":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@0.0.8","dist":{"shasum":"2994c2e0d4985810562e5d3e88e9bb7fd176e116","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-0.0.8.tgz","integrity":"sha512-Vk7BfpHhLGJ10jMF41D/j6FNO35v6jkv/jWmzxeGdrjLKOncgVPpTB8+v5SZNgpnNqrqoVfAeWzg8H7NDEqgkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICt3/N/7vAZMYqGqSBxjvBmgyEO0V37xHb0M/PyTXtI1AiEA+Ia/CZZAq4CAut5mXXBwezOb9oABOlJFL1zkyN8zNlE="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.0":{"name":"law-connect","description":"Connect middleware for Law.","version":"1.0.0","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"lodash":"^4.17.4","routes":"^1.2.0"},"devDependencies":{"body-parser":"^1.17.2","connect":"*","law":"*","mocha":"*","request":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"gitHead":"5be7b01673e20d5333672fab9638bc14bef3f826","bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@1.0.0","_shasum":"4571e28d8e805110e7ca80c94ba946c09c9dc9df","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"dist":{"shasum":"4571e28d8e805110e7ca80c94ba946c09c9dc9df","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-1.0.0.tgz","integrity":"sha512-hx/r8po1E72LzFjOkHGqCQKphHHt3xjGuyRVStjo5ZgPgwSObTmLjhuKeDTyeAtKsFVxBsAPhzHSrsBAaXlSaw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC8j1v0qVY5jA6K+LZUAfSYroQZAQ8/9rMHt16QkMtTjgIhAJkrI2d8RtVizbSgWPeVt50N+iI5gMERTxEr3mWVtxgs"}]},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/law-connect-1.0.0.tgz_1503094341964_0.4726039543747902"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.1":{"name":"law-connect","description":"Connect middleware for Law.","version":"1.0.1","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"fclone":"^1.0.11","lodash":"^4.17.4","routes":"^1.2.0"},"devDependencies":{"body-parser":"^1.17.2","connect":"*","law":"*","mocha":"*","request":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"gitHead":"99788f5b6819c06e260a8bfa279f5467a1959fb9","bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@1.0.1","_shasum":"1b962481c7c80e0cb983d061e5152e3ce74929fc","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"dist":{"shasum":"1b962481c7c80e0cb983d061e5152e3ce74929fc","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-1.0.1.tgz","integrity":"sha512-EVyOzX/y8rZd2tYkgOTa3mKGR7cJgk8fDVQJKEsc0uq+MscDUzSqt7KWPPPN9FvWv1IDCx5bfzlq7q/qSNW+Gw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAKH+EodiussmBjMrkXpRpp/dSO3r9UHA+Evw1VxsGNBAiBwCSNufZsXdFbZGKknp+qbMKcGoZjWzmCdCkfFO6GSDw=="}]},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/law-connect-1.0.1.tgz_1503440485104_0.9377032648772001"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"1.0.2":{"name":"law-connect","description":"Connect middleware for Law.","version":"1.0.2","homepage":"http://github.com/TorchlightSoftware/law-connect","repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"main":"./index.js","dependencies":{"fclone":"^1.0.11","lodash":"^4.17.4","routes":"^1.2.0"},"devDependencies":{"body-parser":"^1.17.2","connect":"*","law":"*","mocha":"*","request":"*","should":"*"},"engines":{"node":">= 0.8.4"},"licenses":[{"type":"MIT","url":""}],"scripts":{"test":"mocha"},"gitHead":"67884d4bffc62222c133c362878c1f8eb2cb3591","bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"_id":"law-connect@1.0.2","_shasum":"3c245d85c05b79e5b0bddbb60f60f6b3acc11dc0","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.1","_npmUser":{"name":"torchlight","email":"info@torchlightsoftware.com"},"dist":{"shasum":"3c245d85c05b79e5b0bddbb60f60f6b3acc11dc0","tarball":"https://registry.npmjs.org/law-connect/-/law-connect-1.0.2.tgz","integrity":"sha512-gGv/dMpWupcRcwYA7zyb5bANHT2TwDoGO0cJcxLgf8E9IyBkmVfjpc54es2zeYBgtPgIKrlOwIrJSJLYiy5/xA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICBAbgP5LKie/lyHT+dOaW0reDjy11N3kRyQiHK2JFbiAiEAzTzSZbTdBQTfl2dkmfv76jek/Sd+iwUDpTuSkXyfU8w="}]},"maintainers":[{"name":"torchlight","email":"info@torchlightsoftware.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/law-connect-1.0.2.tgz_1503442582943_0.9420525978785008"},"directories":{},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"readme":"# Law-Connect\n\nConnect middleware for Law.\n\n## Purpose\nLaw-Connect provides a piece of Connect middleware to route HTTP requests\nto Law services. It provides configurable routing on URI path and HTTP\nmethod, as well as a `resource` helper which expands into standard CRUD\nroutes (modeled after the Rails `resources`[1]).\n\n[1] http://guides.rubyonrails.org/routing.html#crud-verbs-and-actions\n\n## Usage\nLaw-Connect provides a standard Connect middleware.We expect the user to have a\ncollection of _already-configured_ Law services (`services`), a collection of\nroute definitions (`routeDefs`), and an optional object (`options` )of parameters\nthat control how error information is exposed in responses.\n\n## Lifecycle\nLaw-Connect simply provides a constructor for a piece of Connect middleware.\nIt expects a fully wired-up `services` object (the output of `law.create`).\n\n## Example\n\n```js\nconnect = require 'connect'\nlawAdapter = require 'law-connect'\n\n// Given a Connect application...\napp = connect()\n\n// The `connect.json`, `connect.urlencoded`, `connect.multipart` middleware must be `use`'d before Law-Connect\napp.use connect.json() // required!\napp.use connect.urlencoded() // required!\napp.use connect.multipart() // required!\n\n// Given a wired-up `services` object, e.g. the result of:\n//   services = law.create {services, jargon, policy}\nrouteDefs = load './routeDefs'\n\n// Hide most Error information in responses\noptions =\n  includeDetails: false\n  includeStack: false\n\n// Apply the middleware!\napp.use lawAdapter({services, routeDefs, options})\n```\n\n## Error handling and HTTP status codes\n\nErrors are passed in the first callback argument, according to the Node convention\nused within Law. Errors within Law are subtypes of a `LawError` subtype of `Error`,\ncreated with the `tea-error` library. Thus `LawError` and subtypes enrich `Error`\nwith a `toJSON` method and the ability to construct instances with additional\nproperties containing information about the error context.\n\nBy default, all error response bodies include:\n- The error `message`\n- All custom, service-specific properties attached to the `LawError` instance.\n- The error stack trace (`stack`)\n\nIf a Law service returns an error, the HTTP response presently defaults to using a\nstatus code of `500 Internal Server Error`.\n\nIf there was no Law service that could be matched with the request, the middleware\nwill return a `501 Not Implemented` HTTP response.\n\nOtherwise, the default response is `200 OK`. Specific HTTP codes can be specified by\nLaw services by including a `statusCode` property in the `results` argument of the\ncallback, which will always be treated as metadata (and thus _not_ included in the\nresponse body).\n\n\n## Configuration\n\n### Service Definitions\nRegular route definitions are of the form:\n\n```js\n[\n  {\n    path: '/something'\n    method: 'get'\n    serviceName: 'indexThings'\n  }\n  {\n    path: '/something/:id'\n    method: 'get'\n    serviceName: 'showThing'\n  }\n]\n```\nThe values of the `serviceName` property should resolve to a wired-up Law service\nwhen the adapter is constructed. If not, a default `noService` service will respond\nwith a `501` error indicating that no service is implemented.\n\nThe resource syntax uses the format:\n\n```js\n[\n  {\n    resource: 'photos'\n    prefix: 'api'\n    id: 'special_field'\n  }\n]\n```\nThe presence of the `resource` key indicates that the route definition should be automatically expanded\ninto several regular route definitions. The value of `resource` should be the collection name (plural).\n\nThe `prefix` and `id` keys are optional.  `prefix` will namespace all of the routes under the provided string.  `id` configures what named argument will be passed in for the instance routes.\n\nRegular route definitions and `resource` route definitions can be freely interspersed within\na single route definition array, and `resources` definitions will be expanded in-place.\n\n### Options\n\nOptional configuration can be passed via the `options` property of the arguments\nobject. The current properties, which all default to `true`, are:\n\n- `includeDetails`: Include context details attached as properties to any subtypes of `LawError`.\n- `includeMessage`: Include the `Error.message` property.\n- `includeStack`: Include the stack trace via the `Error.stack` property.\n\n## License\n\n(MIT License)\n\nCopyright (c) 2013 Torchlight Software <info@torchlightsoftware.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","maintainers":[{"email":"b@tlsft.com","name":"tlsft"}],"time":{"modified":"2022-08-31T23:11:31.835Z","created":"2013-10-14T19:53:14.329Z","0.0.1":"2013-10-14T19:53:15.904Z","0.0.2":"2013-10-14T21:39:56.479Z","0.0.3":"2013-10-14T22:34:46.729Z","0.0.4":"2013-10-22T01:56:43.556Z","0.0.5":"2013-10-22T17:47:22.388Z","0.0.6":"2013-10-22T19:28:51.156Z","0.0.7":"2013-10-22T19:33:54.430Z","0.0.8":"2013-10-22T22:06:40.761Z","1.0.0":"2017-08-18T22:12:22.144Z","1.0.1":"2017-08-22T22:21:27.160Z","1.0.2":"2017-08-22T22:56:23.114Z"},"author":{"name":"Torchlight Software","email":"info@torchlightsoftware.com"},"repository":{"type":"git","url":"git://github.com/TorchlightSoftware/law-connect.git"},"homepage":"http://github.com/TorchlightSoftware/law-connect","bugs":{"url":"https://github.com/TorchlightSoftware/law-connect/issues"},"readmeFilename":"README.md"}