{"_id":"the","_rev":"13-c4f7745dd3d4dc9a6055bf12786eac13","name":"the","description":"Lightweight schemas for everywhere, whenever.","dist-tags":{"latest":"1.0.2"},"versions":{"0.1.0":{"name":"the","version":"0.1.0","description":"Incredibly perfect tool.","license":"MIT","bugs":{"url":"https://github.com/isnovid/the/issues"},"repository":{"type":"git","url":"https://github.com/isnovid/the.git"},"main":"the.js","author":{"name":"Ivan 'Isnovid' Glazunov"},"_id":"the@0.1.0","dist":{"shasum":"2939f7c74cdaadef674c817317043c3b4c9f6872","tarball":"https://registry.npmjs.org/the/-/the-0.1.0.tgz","integrity":"sha512-GN0jNQzZcyEvsUV1y4Vnd8H2uS2oajak/e/7juzvrjtmmwidV7KxcvZlgNiJOUy9uAinF4m+cbuMZaYs+q1KdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6ArtjuXgDFvPFIOG9658dAd5U3IQfdkkYJuKlRyKrpQIgEK74/8RpPrYytm9Se0ANOB4SVWjtjDJG3RM54RrYp/o="}]},"_from":".","_npmVersion":"1.2.18","_npmUser":{"name":"isnovid","email":"isnovid@gmail.com"},"maintainers":[{"name":"isnovid","email":"isnovid@gmail.com"}],"directories":{}},"1.0.0":{"name":"the","description":"Lightweight schemas for everywhere, whenever.","version":"1.0.0","author":{"name":"Dylan Piercey","email":"pierceydylan@gmail.com"},"bugs":{"url":"https://github.com/DylanPiercey/the/issues"},"dependencies":{"is-typeof":"^1.0.0"},"devDependencies":{"dox":"^0.8.0","gulp":"^3.8.11","gulp-mocha":"^2.0.1","mocha":"^2.2.5","snazzy":"^4.0.0","standard":"^7.1.0"},"homepage":"https://github.com/DylanPiercey/the","keywords":["assert","ok","okay","schema","test","the","validate","validation","validator"],"license":"MIT","main":"lib/index.js","prepublish":"npm test && npm run doc","repository":{"type":"git","url":"git+https://github.com/DylanPiercey/the.git"},"scripts":{"doc":"gulp build-doc","lint":"standard --verbose | snazzy","test":"npm run lint && gulp test"},"standard":{"globals":["describe","it","before","beforeEach","after","afterEach"]},"gitHead":"a1bf7cc0839938e0fbe345ae8d9290cea507e594","_id":"the@1.0.0","_shasum":"c257d21cfa70a7ce2354ddb726f161a9e2ac90e6","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},"dist":{"shasum":"c257d21cfa70a7ce2354ddb726f161a9e2ac90e6","tarball":"https://registry.npmjs.org/the/-/the-1.0.0.tgz","integrity":"sha512-OUO49Up3hwNoO8CYWDjHoGG9liXCDZGGs8CSVVf7AinX0fb2XhkOdX3gRwPq4Phmi5/KGK+ZqExA8KmACjTj2g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJ/ih5OAoVG9bNbZ7/d5jAfGAJwKOw7cCYv7fYrE48tAiB0z870dEwtccLIJoBAZA2UWGBmClQKNcMtiaQY8E2biA=="}]},"maintainers":[{"name":"dylanpiercey","email":"pierceydylan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/the-1.0.0.tgz_1463890587599_0.6827397192828357"},"directories":{}},"1.0.1":{"name":"the","description":"Lightweight schemas for everywhere, whenever.","version":"1.0.1","author":{"name":"Dylan Piercey","email":"pierceydylan@gmail.com"},"bugs":{"url":"https://github.com/DylanPiercey/the/issues"},"dependencies":{"is-typeof":"^1.0.0"},"devDependencies":{"dox":"^0.8.0","gulp":"^3.8.11","gulp-mocha":"^2.0.1","mocha":"^2.2.5","snazzy":"^4.0.0","standard":"^7.1.0"},"homepage":"https://github.com/DylanPiercey/the","keywords":["assert","ok","okay","schema","test","the","validate","validation","validator"],"license":"MIT","main":"lib/index.js","prepublish":"npm test && npm run doc","repository":{"type":"git","url":"git+https://github.com/DylanPiercey/the.git"},"scripts":{"doc":"gulp build-doc","lint":"standard --verbose | snazzy","test":"npm run lint && gulp test"},"standard":{"globals":["describe","it","before","beforeEach","after","afterEach"]},"gitHead":"e4ceba742b7a54ebaa5abc6aaca7665440d69083","_id":"the@1.0.1","_shasum":"1d026905dbe8c27484fd007fdf29b958fa739877","_from":".","_npmVersion":"3.8.6","_nodeVersion":"6.1.0","_npmUser":{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},"dist":{"shasum":"1d026905dbe8c27484fd007fdf29b958fa739877","tarball":"https://registry.npmjs.org/the/-/the-1.0.1.tgz","integrity":"sha512-gPiU7nf9XTlGg7fcpbtT+Oz/Vez8cvIPd6WPf0v8zKNkQU1jbcg9X4eFKAiC95AjLErteROHe9ZGjlUeFckr8A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDVrCR7aEghoLG+jOYReZB8Ycyc/q91q202SCzcV/E0cAiAF6FULAJhmX9+US0S41jQ+r8MhQct4TxjSYo3VSDJMNg=="}]},"maintainers":[{"name":"dylanpiercey","email":"pierceydylan@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/the-1.0.1.tgz_1464320240832_0.976318409666419"},"directories":{}},"1.0.2":{"name":"the","description":"Lightweight schemas for everywhere, whenever.","version":"1.0.2","author":{"name":"Dylan Piercey","email":"pierceydylan@gmail.com"},"bugs":{"url":"https://github.com/DylanPiercey/the/issues"},"dependencies":{"is-typeof":"^1.0.3"},"devDependencies":{"dox":"^0.9.0","gulp":"^3.9.1","mocha":"^3.4.2","snazzy":"^7.0.0","standard":"^10.0.2"},"homepage":"https://github.com/DylanPiercey/the","keywords":["assert","ok","okay","schema","test","the","validate","validation","validator"],"license":"MIT","main":"lib/index.js","prepublish":"npm test && npm run doc","repository":{"type":"git","url":"git+https://github.com/DylanPiercey/the.git"},"scripts":{"doc":"gulp build-doc","lint":"standard --verbose | snazzy","test":"npm run lint && mocha ./test/**/*.test.js"},"standard":{"globals":["describe","it","before","beforeEach","after","afterEach"]},"gitHead":"2a7e03e81e185f6fa66981c44b321b42450d882d","_id":"the@1.0.2","_npmVersion":"5.0.3","_nodeVersion":"8.1.2","_npmUser":{"name":"dylanpiercey","email":"pierceydylan@gmail.com"},"dist":{"integrity":"sha512-FElbqlkdZ62IToh74UK4eCQagGvbeqUWbQ/Feqdp8guiRjRADrHm5dmbNL5Lk1dqVsGCVPeIryYTjphrQIY7bw==","shasum":"a1e00c99ec79b541a30d452ad6ff406c82ed3cb1","tarball":"https://registry.npmjs.org/the/-/the-1.0.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTd7MIT3ZAL9lC6LaHrhVg7kVhsJBKwzQBwrrhclAbYwIhAMdyAQfDT+Yewrr6eE6K0aXUwo1MgNltRL7lfqXyuAjF"}]},"maintainers":[{"name":"dylanpiercey","email":"pierceydylan@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/the-1.0.2.tgz_1497560155402_0.6845109309069812"},"directories":{}}},"readme":"# The\nThe flexible lightweight testing library.\n(Formerly `oke`).\n\n[![npm](https://img.shields.io/npm/dm/the.svg)](https://www.npmjs.com/package/the)\n\n# Why\n`The` was created to validate everything from javascript models and ajax requests to databases like CouchDB.\nIt allows for quick simple validations as well as complex nested validation.\nCollections, objects and more are supported out of the box and it can be easily extended!\n\n# Features\n* Chainable tests that read clearly.\n* Composable tests that make sense.\n* Schema validation for complex objects and arrays.\n* An error message structure that is terse and friendly for developers.\n\n# Installation\n\n#### Npm\n```console\nnpm install the\n```\n\n# Example\n\n```javascript\nvar the = require('the');\n\nvar schema = the().object({\n    username: the().string().alphaNumeric().length(5, 30),\n    password: the().string().optional().matches(/^[a-zA-Z0-9]{2,30}$/),\n    phoneNumbers: the().array(\n        the().string().phone()\n    )\n});\n\nvar doc = {\n    username: 'Hello',\n    password: 'World',\n    phoneNumbers: [\n        '123',\n        '555-555-5555'\n    ]\n};\n\nschema.assert(doc); // Throw an error unless doc matches the schema.\n```\n\nThe above schema defines the following constraints:\n\n* username\n    * A required string.\n    * Must contain only alpha numeric characters.\n    * Between 5 and 30 characters long.\n* password\n    * An optional string.\n    * Must satisfy custom regex.\n* contacts\n    * Must be an array.\n    * Each element must be a string and a phone number.\n\n---\n\n## [Click for API Methods](https://github.com/DylanPiercey/the/blob/master/API.md)\n\n---\n\n## Error Structure\n\n```javascript\n{\n    \"name\": \"ValidationError\",\n    \"message\": \"Validation Failed\",\n    \"errors\": {\n\n        // The key is the full path of the error. In this case, the first phone number.\n        'phoneNumbers.0':\n\n        // Array of errors for this path.\n        [\n            {\n                // The name of the failed validator.\n                type: 'phone',\n\n                // The value that was at the path (that failed).\n                value: '123'\n            }\n        ]\n    }\n}\n```\n\n---\n\n### Contributiors\n\n* Use `npm test` to run tests.\n\nPlease feel free to recommend more default tests and/or submit a PR!\n","maintainers":[{"email":"marcacyr+npm@gmail.com","name":"marcacyr2"}],"time":{"modified":"2022-06-27T05:55:37.209Z","created":"2013-05-21T00:40:22.092Z","0.1.0":"2013-05-21T00:40:27.788Z","1.0.0":"2016-05-22T04:16:30.165Z","1.0.1":"2016-05-27T03:37:23.348Z","1.0.2":"2017-06-15T20:55:55.636Z"},"author":{"name":"Dylan Piercey","email":"pierceydylan@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/DylanPiercey/the.git"},"bugs":{"url":"https://github.com/DylanPiercey/the/issues"},"license":"MIT","readmeFilename":"README.md","homepage":"https://github.com/DylanPiercey/the","keywords":["assert","ok","okay","schema","test","the","validate","validation","validator"],"users":{"qisong":true}}