{"_id":"schemajs","_rev":"31-0e9df623057a0aad1740377bc227f9dd","name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","dist-tags":{"latest":"0.1.14"},"versions":{"0.1.0":{"name":"schemajs","description":"extensible object validator","version":"0.1.0","author":{"name":"eleith"},"contributors":[],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"dependencies":{},"engine":["node >= 0.3.8"],"main":"schema","_npmJsonOpts":{"file":"/home/eleith/.npm/schemajs/0.1.0/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"schemajs@0.1.0","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.28","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"184315f56ca3bf3429d41b538197bd1074a96762","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.0.tgz","integrity":"sha512-222YnMvfpeFgHHuC60iygFElh+sf/n1/4L9kbnJc2w2gWtrCG0GNehQ73k212Dw3xFakycGbE8R111XAEXquKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEO5NmEMLw+xslZ5oRyhQrZTXg6b3Gsgn3QN6kkQdltwIgRNFfQlFf5W8icxBdnP+gwQ1WNG+TTBoFxfTruosHr2A="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.1":{"name":"schemajs","description":"extensible object validator","version":"0.1.1","author":{"name":"eleith"},"contributors":[],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","_npmJsonOpts":{"file":"/home/eleith/.npm/schemajs/0.1.1/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"schemajs@0.1.1","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.28","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"23b8a5f58d04b90b7650ca992680b1e004b4de8a","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.1.tgz","integrity":"sha512-DZ+ktI/QT4Pc2Ma4tqZevMG2ap6y+GQfSMm2uNUGaSPBuapdAKzh92tHfDDGiipUiEEcpsg6TAqNBqc7zr7huA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBPKnArrCQWtDI7nz7sEijgk4EiIHIWwv12iwN9rKdOnAiEA3p91sQVBTggANhUjTziOyUKm2W3suNySVVfdw6vF/jk="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.2":{"name":"schemajs","description":"validate objects (including http request params) agains a schema. includes express middleware","version":"0.1.2","author":{"name":"eleith"},"contributors":[],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","_npmJsonOpts":{"file":"/home/eleith/.npm/schemajs/0.1.2/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"schemajs@0.1.2","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.28","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"897c4cfb7a79dd9d1f204769880cddd064640b78","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.2.tgz","integrity":"sha512-VGqKkMs9NxeYepsc4WbTVQc8qhFRa/y3NNDZu5ysOiMfe10S7Keerw+bIXsOtD6OE0ZcmX6oReGnR0MV3RXC1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDYX0KhwbKXm5tGpFRb5G/Fsb4Z3jbXuiY7+kOuJRPVpAiEAsZPbpuFM8ilnvpTqI60HMIvDipvFo02CJVTdQJ8tZo8="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.3":{"name":"schemajs","description":"validate objects (including http request params) agains a schema. includes express middleware","version":"0.1.3","author":{"name":"eleith"},"contributors":[],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","_npmJsonOpts":{"file":"/home/eleith/.npm/schemajs/0.1.3/package/package.json","wscript":false,"contributors":false,"serverjs":false},"_id":"schemajs@0.1.3","devDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.28","_nodeVersion":"v0.4.12","_defaultsLoaded":true,"dist":{"shasum":"e1b63f570092605998c0f00fa55741452eeb0e03","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.3.tgz","integrity":"sha512-zVoReGKxWDRFHnEmUNUBFooCqL5E+tz1BHdYyCxPY4PHEACo2Dd8H9jWfs/wQKG+anfuOITuzHsNHF7QOmcNrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRzk6BFs5mod2K3fEloprJTutMSLKGnvYNQZhhzO17dAiEAyWvbKV4uRPRCamz7eBKb8ThLqYnhLa0PZtfy8feRBUo="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.4":{"name":"schemajs","description":"validate objects (including http request params) agains a schema. includes express middleware","version":"0.1.4","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"devDependencies":{"tap":">= 0.0.13"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"tap test/*.js"},"_npmUser":{"name":"eleith","email":"work@eleith.com"},"_id":"schemajs@0.1.4","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.0.105","_nodeVersion":"v0.6.1","_defaultsLoaded":true,"dist":{"shasum":"e49f77a2ec3ad7e1184450f8e277825defa8ffec","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.4.tgz","integrity":"sha512-qDM+DnrFHA4D1kmaqcaKdxY0mo1n/hQE+HIFXGUCUQieYlm9XQGAABcQ5TazLTbneZ0MXRBmAMY7GaKFcqBiDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCjLvFGFQ/zwt8MIeSfyHvfEAu9sAU5y2gj3fM0fGUBKQIgMTl0XWCNQ21ZxR1VJTX2UiQaVa/4d+vQFK9+VBw9/SY="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.5":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.5","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"devDependencies":{"tap":">= 0.0.13"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"tap test/*.js"},"_npmUser":{"name":"eleith","email":"work@eleith.com"},"_id":"schemajs@0.1.5","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"8578b6ec205a20604650c485c8b8c610ff880978","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.5.tgz","integrity":"sha512-eBT6NXgN+dz/sbEOuAjNiXQuuRQrLkK6EgGmHD+xg+gvMnEKDIoP9XyZr2P61um557cmI1xeE3tJ6Vywb3SNXw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCocYdv88N6hK4s4XEzJugtTK9wyAhykf5ZcSm/SuBvfQIhAJRMOxFlIKvq9Tx4ueSZIbPOm2fUfl4Y+LW4xCRCn6Kw"}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.6":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.6","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"devDependencies":{"tap":">= 0.0.13"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"tap test/*.js"},"_npmUser":{"name":"eleith","email":"work@eleith.com"},"_id":"schemajs@0.1.6","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-beta-10","_nodeVersion":"v0.6.7","_defaultsLoaded":true,"dist":{"shasum":"b8909c2c8773b83b2a543c62a8c2065debb45fb4","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.6.tgz","integrity":"sha512-xi+B2v31m7wZURNMphuI6Ucse7Ej9bj8/HsOFMlCSuTpT6xUZRtn4e46vvaXwvJCEwmUtgYTF4tIPIFT5Hb0+Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHKHgtFjSlRebT8XVtwbBDUl6XfDtk65xigf1lGV5AGgIhAJRTWlGo7uQxwRXvIVsinW5IfkzY2iQcAcl5TCEndkG8"}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.7":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.7","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"git://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"_npmUser":{"name":"eleith","email":"online@eleith.com"},"_id":"schemajs@0.1.7","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.21","_nodeVersion":"v0.6.18","_defaultsLoaded":true,"dist":{"shasum":"663ae3ec6ab392c88c2d58444728caee72ba5e42","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.7.tgz","integrity":"sha512-f4RnTcMGv84us7olALX5ALCqjR5CLKJtbhLWNQgq3SOfoTwUMPJCMoAoLipeOcSnlwYciO0MX7tdLN6MMIJChA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDzAbyzEvBRBtUGZ6TjVhf1VDHYIWWYk6qoBf53IfGfowIgJ5oI/TcsL8cV5ZH0AjzhVzQOwx2JzF3QmaqfBTuHd3s="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.8":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.8","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"_id":"schemajs@0.1.8","dist":{"shasum":"c9e532a6d57e988e50caaee601b196e17260ec76","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.8.tgz","integrity":"sha512-2wGEC9BsmWLMBJ4GM5GTNSiNt8LmHGuOIHTnGArQN1aEjZTgi8LWZNR488UqfyH5/7Ixbh2E8uX1oRm6hvLA6g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCyNuUa/VqJoMn+Q0y+aS82/3umdGsEb1iNFcOrC/XqfgIhAN92AsVa4lgU/7KzGEwwLntie6RMgMhqHZFHyAh4bN0B"}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.9":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.9","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"_id":"schemajs@0.1.9","dist":{"shasum":"c4370234d26a4899b8b8e0f37eb2db4a2488f063","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.9.tgz","integrity":"sha512-DAssnjyEECURYgKt4YL9D1zRYDCCgSUByd4acA4WhlOUUmi4l0znI9teLQwjfws+nO1xCWwJu3of4sQxcNt43g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUXlvS+srEN0Rn4pXCBlkSkWRbN+qNQhwy1YBHG9ozoAIgX6gB9HeHQzR/0xMv/g3ShKQwZzRkhij+GFZzmYiN8cM="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.10":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.10","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"_id":"schemajs@0.1.10","dist":{"shasum":"733191fbda0e6d0bf64e5d98577392647ab6e60b","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.10.tgz","integrity":"sha512-uhm6fw03fzdrz0EOewqmCRNRr/9l+9fOqUW7F3wZ2zwrkFkwCGuQTHUtORt16YCX/0Pfuhp9KnUcuk4F7xPzOQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCcNd+RHAAAMrT6BD1160A5riQeW9w+LPGxz75AGP2KEAIgDS2Pf30tjjCx2JYKY8Tl9XXtq0fxQGaR9ISgWCv9oCU="}]},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.11":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.11","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"bugs":{"url":"https://github.com/eleith/schemajs/issues"},"homepage":"https://github.com/eleith/schemajs","_id":"schemajs@0.1.11","dist":{"shasum":"ba9cb1725f24730c0a6fb34e00b0f2db11a5af0d","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.11.tgz","integrity":"sha512-NwYac3ms8gEOOYDdk48TWC19zXA2FqEg764ZELTW/gwp25e6UjM9+XwAUmCAx8M4b7KgNez5OLpOV8wKuQ6pWQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUK/ulfhvyQQbx9xiVpYsL0thL75zjRUJ5nrqRCsArBQIgb+O7O1swfw1o6zbTdX0D87svK5Hw58rkh6DvC4elMAk="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eleith","email":"online@eleith.com"},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.12":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.12","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"bugs":{"url":"https://github.com/eleith/schemajs/issues"},"homepage":"https://github.com/eleith/schemajs","_id":"schemajs@0.1.12","dist":{"shasum":"6353b3ab17fba3b4bfaa9b3b8cbd668feacd0ad6","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.12.tgz","integrity":"sha512-FUvuxrZRXFiqnU0An9YMj9NBShIJVA8dZf0QWYeJyOJor0MQLNeGq7Ndfnp014Si3FfVd2S4ulHZoCcr7BDvBw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHg7/Syy6L2q+yvpNOxO4jQLHCjgoWCnnVAEskd2hrxcAiA4g9eq2CKPu8id/AN7+3PnhME8fsR1G0xpCSfGhAo4qw=="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eleith","email":"online@eleith.com"},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.13":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.13","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"bugs":{"url":"https://github.com/eleith/schemajs/issues"},"homepage":"https://github.com/eleith/schemajs","_id":"schemajs@0.1.13","dist":{"shasum":"45128830810b270a6c9b28efd6acff4bec6ec9d5","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.13.tgz","integrity":"sha512-ZaE7LrDDc6Cz+jatAz5G+uGCWa1EFLHV0vZLcvF2pR3YRwrCE3/8RuAGFdRAWExn3j6PpJquhjprb8pV2jwUfA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYaWJcnfKUupeUr6DypvxVl5cjUYg1Tkeh7hZolsETLAIgNAqAUfzwv4nWZq3JE/v8w0a5nC1J/FDkq5LGAihm7Hc="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eleith","email":"online@eleith.com"},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]},"0.1.14":{"name":"schemajs","description":"validate objects (including http request params) against a schema. includes express middleware","version":"0.1.14","author":{"name":"eleith"},"contributors":[{"name":"andychilton"}],"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"devDependencies":{"mocha":">= 1.0.3","chai":">= 1.0.3"},"dependencies":{"underscore":">= 1.1.7"},"engine":["node >= 0.4.8"],"main":"schema","scripts":{"test":"mocha -R spec test/*.js"},"bugs":{"url":"https://github.com/eleith/schemajs/issues"},"homepage":"https://github.com/eleith/schemajs","_id":"schemajs@0.1.14","dist":{"shasum":"2c7d8ba5382745d35fe16c939a6def6444fe0f4e","tarball":"https://registry.npmjs.org/schemajs/-/schemajs-0.1.14.tgz","integrity":"sha512-Z++sNG4RiRweVhdkxwBFhFobC0RVtp9Dqk1DIhM6faL+4ncy5q+WsVXl7ZRKpmnu5vA6oqjkxu3/k3vGWp3o4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJpiP2eTKtyUKhKY9YNczoxwRq2rNo7KTmKOsZKSA7LAiEA5wdXn19dTOQeha7TZ1F428W0qJ0RQjdr3C4cH6CTaKo="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"eleith","email":"online@eleith.com"},"maintainers":[{"name":"eleith","email":"work@eleith.com"}]}},"maintainers":[{"name":"eleith","email":"work@eleith.com"}],"time":{"modified":"2022-06-26T16:31:51.356Z","created":"2011-09-23T22:11:14.840Z","0.1.0":"2011-09-23T22:11:16.136Z","0.1.1":"2011-09-23T22:15:01.023Z","0.1.2":"2011-09-24T19:08:00.512Z","0.1.3":"2011-09-25T05:17:35.415Z","0.1.4":"2011-11-15T06:50:37.471Z","0.1.5":"2012-02-08T22:35:01.798Z","0.1.6":"2012-03-18T14:59:39.251Z","0.1.7":"2012-05-28T01:09:09.308Z","0.1.8":"2012-10-07T23:25:06.304Z","0.1.9":"2012-10-08T00:19:38.732Z","0.1.10":"2012-10-09T07:36:45.533Z","0.1.11":"2014-08-24T06:37:45.657Z","0.1.12":"2015-08-09T16:31:20.255Z","0.1.13":"2015-11-22T17:54:21.493Z","0.1.14":"2015-11-22T17:55:11.518Z"},"author":{"name":"eleith"},"repository":{"type":"git","url":"http://github.com/eleith/schemajs.git"},"readme":"### schemajs [![Build Status](https://secure.travis-ci.org/eleith/schemajs.png)](http://travis-ci.org/eleith/schemajs)\n\nvalidate objects (including http request params) against a schema. includes express middleware.\n\n### Installing \n\n\tnpm install schemajs\n\n# FEATURES\n - validates schema for deep objects and arrays as well\n - schema is in JSON, making it portable\n - properties, types and filters are extensible\n\n# EXAMPLE USAGE - validate an object\n\n```javascript\nvar schema  = require(\"./path/to/schemajs\");\nvar model   = schema.create(\n{\n  name:\t   {type:\"string\", filters:\"trim\", properties:{max:255}, required:true},\n  email:   {type:\"email\", filters:\"trim\", required:true},\n  wins:    {type:\"int\", filters:[\"trim\", \"toInt\"], default:0},\n  average: {type:\"float\", filters:[\"trim\", \"toFloat\"], default:0}\n});\n\nvar form = model.validate({name:\" your name \", email:\" name@example.com \"});\n\n// form.valid  - boolean, true if object matches schema\n// form.data   - contains filtered version of the object {name:\"your name\", email:\"name@example.com\", wins:0, average:0}\n// form.errors - contains associative array of any errors found\n```\n\nIf you pass `{strict: true}` as additional arguments into `Schema#validate`, the validation will fail if there are additional keys in the object which are not defined in the schema.\n\n\n# EXAMPLE USAGE - in expressjs, validate the request parameters\n```javascript\nvar schema  = require(\"./path/to/schemajs\");\nvar query   = schema.create(\n{\n  wins:    {type:\"int\", filters:\"toInt\"},\n  query:   {type:\"string\", filters:\"trim\", required:true, error:\"invalid query\"}\n});\n\napp.get(\"/users\", schema.middleware(query), function(req, res)\n{\n  // schema validation is attached to req.form\n  if(req.form.valid)\n  {\n    db_lookup({query:req.form.data.query, wins: req.form.data.wins});\n  }\n  else\n  {\n    next(new Error(\"invalid request\"));\n    //next(req.form.errors, 400);\n  }\n});\n```\n# API \n\n## schema.test(schema)\n\nquickly test an individual schema\n\n```javascript\nfield = schema.test(\"email@email.com\", {type:\"email\", trim:true, properties:{min:5}});\n```\n\n## schema.create(schema)\n\nschema for a simple object of one integer value\n\n```javascript\nschema =\n{\n         // [string] value for acceppted parameters of the object you want to test\n  \"wins\":\n  {\n    // [string (built in types) or function (custom types)] the type declaration for accepted values\n    \"type\": \"int\",\n      \n    // [string (built in filters) or function (custom filters) or array (mix and match!)] \n    // OPTIONAL, filters to process and optionally modify values\n    \"filters\": [\"trim\", \"toInt\", custom_filter],\n      \n    // [anything] \n    // OPTIONAL, the default value if none is supplied by the object\n    \"default\": 0,\n      \n    // [boolean] \n    // OPTIONAL, if true, this parameter must exist to validate\n    \"required\": true,\n\n    // [boolean] \n    // OPTIONAL, if true, this parameter can be null, despite any other rules\n    \"allownull\": true,\n \n    // [object] \n    // OPTIONAL, functions are custom property checks, else a built in property will be looked up\n    \"properties\": {max:100, min:0, special:custom_property},\n      \n    // [string, object] OPTIONAL, if there is an error, you can override the message that is returned\n    // use a string or the \"default\" key to use the default error message\n    // keys can be any property key that was used as well as \"filters\", \"required\", \"type\"\n    \"error\": {max: \"too many wins\", min: \"too few wins\", \"default\": \"something is wrong with your wins value\"}\n  }\n};\n```\n\nschema with embedded schemas for object and array types\n\n```javascript\nschema =\n{\n  \"user\":\n  {\n    \"type\":  \"object\",\n    \"schema\":\n    {\n      \"name\":  { type: \"string\", properties: { max: 255 }, required: true},\n      \"email\": { type: \"email\", error: \"email is not a valid email address\"}\n    },\n    \"error\": \"user needs an email and a name\"\n  },\n      \n  \"tags\":\n  {\n    \"type\":  \"array\",\n    \"schema\":\n    {\n      \"type\": \"string\"\n    },\n    \"properties\":  { max: 10, min: 3},\n    \"error\": { max: \"too many tags\", min: \"too few tags\" }\n  }\n};\n```\t\n\n## schema.types\n\t\nbuilt in types \n\n\t[string+, string (empty string allowed), alpha, alphanum, email, object, array, date, number, int, boolean, url, zipcode]\n\nto extend, add a function onto schema.types that accepts a value and returns a boolean if the type matches\n\ntest is run AFTER schema.filters are run\n\n```javascript\nschema.types.awesome = function(value)\n{\n  if(isAwesome(value))\n    return true;\n  else\n    return false;\n}\n```\n## schema.filters\n\t\nbuilt in filters:\n\n\t[toInt, toFloat, toString, toDate, toBoolean (converts on/off, true/false, 1/0, yes/no to bools), trim, lowercase, uppercase]\n\nto extend, add a function onto schema.filters that takes in a value and returns the updated value\n\nfilters are run BEFORE schema.test is run\n\n```javascript\nschema.filters.surround = function(value)\n{\n  if(value == needs_surrounding)\n    return \"----\" + value + \"----\";\n  else\n    return value;\n}\n```\n\n## schema.properties\n\nbuilt in properties\n\n\t[max, min, regex, in]\n\nto extend, add a function onto schema.properties that takes in a value and any additional arguments\n\nproperties are run AFTER test and filters\n\n```javascript\nschema.properties.unique = function(value)\n{\n  if(isArray(value) && allUnique(value))\n    return true;\n  else\n    return false;\n}\n\nschema.properties.notIn = function(value, badwords)\n{\n  if(badwords.indexOf(value) != -1)\n    return false;\n  else\n    return true;\n}\n```\n\n\n## Browser usage\nYou can use it in the browser by using [browserify](http://browserify.org/), however if that's too much work just use <https://wzrd.in/>. There is also an example <examples/cdn.html>\n\n\n# ideas\n\n   - dependency property making one parameters existance depend on another\n   - more types (phone numbers, credit card, ip address)\n   - more filters (camelcase, encode/unencode)\n   - more properties\n","homepage":"https://github.com/eleith/schemajs","contributors":[{"name":"andychilton"}],"bugs":{"url":"https://github.com/eleith/schemajs/issues"},"readmeFilename":"README.md","users":{"vbauer":true}}