{"_id":"joi-json","_rev":"15-b1ae890798f34600659d8564a6efd4a8","name":"joi-json","description":"Builds Joi schemas from JSON objects","dist-tags":{"latest":"4.0.0","beta":"4.0.0-beta1"},"versions":{"1.0.0":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"1.0.0","main":"lib/index.js","keywords":["validation","joi","lov","json","schema"],"scripts":{"test":"mocha --recursive","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive"},"repository":{"type":"git","url":"git+https://github.com/vandium-io/lov.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","freshy":"^1.0.2","istanbul":"^0.4.3","joi":"^8.4.2","lov":"^1.2.1","mocha":"^2.5.3","require-blocker":"^1.0.0","sinon":"^1.17.4"},"gitHead":"75f03ab8cb267abc18eb3a521fd4403121049026","bugs":{"url":"https://github.com/vandium-io/lov/issues"},"homepage":"https://github.com/vandium-io/lov#readme","_id":"joi-json@1.0.0","_shasum":"23aac4af6457d885aeb759a6355fe3ce97150e41","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"dist":{"shasum":"23aac4af6457d885aeb759a6355fe3ce97150e41","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-1.0.0.tgz","integrity":"sha512-VNQGCjHJeMyhGBbUAOzayhk+4XYkElCBzEYZCIOTlN0GeE05rdqvdHf51XuK07jGkjpYWE9yiCnKLHPH2xOZLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICXBb2Rlr6Nvuc7TaNBftdkTp99cs84KSvBSIUhuuNfjAiEAwtQaX8Gyie24xcCOSk6ppWbbjrSOuXfBfICdC5wbdj0="}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/joi-json-1.0.0.tgz_1466635975927_0.47551315813325346"},"directories":{}},"1.0.1":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"1.0.1","main":"lib/index.js","keywords":["validation","joi","lov","json","schema"],"scripts":{"test":"mocha --recursive","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive"},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","freshy":"^1.0.2","istanbul":"^0.4.3","joi":"^8.4.2","lov":"^1.2.1","mocha":"^2.5.3","require-blocker":"^1.0.0","sinon":"^1.17.4"},"gitHead":"f8014b88d4c523c643a2dba7f49ec1274d9aec5d","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@1.0.1","_shasum":"4301be771a31509ef25850454690e1053960737f","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"dist":{"shasum":"4301be771a31509ef25850454690e1053960737f","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-1.0.1.tgz","integrity":"sha512-eFsV7DlqxDR0DG6djb+lKedG4O9/hZvoXtnGm0USLep08s3ubnNhdy2NEiGALMH5J5YAvBUgDuhTE0Yi1oUOWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvK1e4CUMwCnzd6UBKEgjEnfPGXxqHMiJ3wWfNUuIjdgIgeBg05VDhRc+pAFPQ4acm0vv9PQWXLXXufMh/wCn0GMk="}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/joi-json-1.0.1.tgz_1469463474140_0.18364308052696288"},"directories":{}},"1.1.0":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"1.1.0","main":"lib/index.js","keywords":["validation","joi","lov","json","schema"],"scripts":{"test":"mocha --recursive","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive"},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.1.0"},"devDependencies":{"chai":"^3.5.0","freshy":"^1.0.2","istanbul":"^0.4.3","joi":"^8.4.2","lov":"^1.2.1","mocha":"^2.5.3","require-blocker":"^1.0.0","sinon":"^1.17.4"},"gitHead":"20d0eb7e155de8f90675c95557bcf922ffe830bd","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@1.1.0","_shasum":"cdf12e7bb5aedc3bb99802194c972a203013af23","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"dist":{"shasum":"cdf12e7bb5aedc3bb99802194c972a203013af23","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-1.1.0.tgz","integrity":"sha512-H83NLAaPsEZUo9QHv+7mOeRcqSN14ScMfJi2Sf0KNhFY6mlvusX9tcZkKd81DXCt3OUWc+2G9Ui37QN88QZ7Mg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCq+vgkDZSP2k7sMxQM+JP7RZ4iQSaaHyNTjXM8XPEr9AIhAPYm847yfbqff1G7E+45lT/P4f9UGOOY++PJHxoZtxxw"}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/joi-json-1.1.0.tgz_1469544673467_0.7345537557266653"},"directories":{}},"2.0.1":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"2.0.1","main":"lib/index.js","keywords":["validation","joi","lov","json","schema"],"scripts":{"test":"mocha --recursive","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive"},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.1.0"},"devDependencies":{"chai":"^3.5.0","freshy":"^1.0.2","istanbul":"^0.4.3","joi":"^8.4.2","lov":"^1.2.1","mocha":"^2.5.3","require-blocker":"^1.0.0","sinon":"^1.17.4"},"gitHead":"03bb16bf0c45a7a5bc1aa9e72ba25021e63218e5","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@2.0.1","_shasum":"b849d7c55648ef9d2b8e0a8313ccf7296fa42eda","_from":".","_npmVersion":"2.14.12","_nodeVersion":"4.3.2","_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"dist":{"shasum":"b849d7c55648ef9d2b8e0a8313ccf7296fa42eda","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-2.0.1.tgz","integrity":"sha512-DuCiGBFJylWcffw52qDQJGHQ2OL83Tzfh48+AVieA9F+rYhdHYY2ZBRG1NpJWtnnMhGSWCkuOcVhQ4KzmtPevg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpsX+azYLyfEj/xJ66MLJGA6Rbx0OiBWUikkQdunEnxQIhAOVJiS2WSw2i/Cz8Rstw3XqRv5jQJOEUIwKYyULjevlq"}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/joi-json-2.0.1.tgz_1470248480166_0.28173763514496386"},"directories":{}},"2.1.0":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"2.1.0","main":"lib/index.js","keywords":["validation","joi","lov","json","schema"],"scripts":{"test":"mocha --recursive","coverage":"istanbul cover node_modules/mocha/bin/_mocha -- -R spec --recursive"},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.1.0"},"devDependencies":{"chai":"^4.2.0","freshy":"^1.0.2","istanbul":"^0.4.3","joi":"^8.4.2","lov":"^1.2.1","mocha":"^5.2.0","require-blocker":"^1.0.0","sinon":"^6.3.4"},"gitHead":"3a58dc51281f10abd7100cdd6a5bce51262f5b47","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@2.1.0","_shasum":"4829cca91e531d19c4cad1205a08d61549a0c051","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.3","_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"dist":{"shasum":"4829cca91e531d19c4cad1205a08d61549a0c051","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-2.1.0.tgz","integrity":"sha512-0NKQSqMeBzzU5FLoIPnmTNV3ZwA7TeN1itCpiYnumq9WIQGFAgIuEyEuBJ4xHhxa57E980zKU2596E9pODcYAg==","fileCount":16,"unpackedSize":16763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbrAwCCRA9TVsSAnZWagAAblAP/RB5J4x5LNumxib7zAtM\nwi0YisFwUrlyEmsEgs7nyt3IXc61rcfbSFS9FMt19pARNAROkQJo0hog2gu6\nRCQIo8Qe62Vu/Wf1VnBEKGD5Faew12SosBmNfGS1bE6WcbaISp/aD2CvBT1E\nAK3YVUpqEJsAq7pOo+1+615O6ZbeIcC3O2uJO2lX9r+CbXkgzZ2R3ipmoPMK\ntXubwPQFj7FdhYF/36kSUm6k4aWEtt5+sFvXEsQhDVIE0zunkWaGN87FCRm7\nGz2LjFCYJKLWhj2M1JSa80fIwF6ZNqcy4gpUowvmNv8X7JdBoItMQYe8c+Lu\n1bqfqOVb5ZWSclQd6JpN49xLQ4PM4wkrtAxqA25+RV/8C1GF85Ao6vHpL00z\nXLT/RYIFtm1XdRu41JdPgC8dH0DE51VGdg6l+rCU6nhGnh7MelWqS1v60cYK\nv/NrjYKklicmvkDkbAJbL/1zX2NEzu7TKar15i+1txy8Eb2kVkSa31W1hbBK\nixpYLvq82Lf8zyVyUwVN3FttU1UysN4z6R4MNjreQm2kPncGjwD9rqUk8tAe\nkVE3z1R3shzwde3T+ywML0TBSFsb3TKg0D5bozE9nn5guOGz/LTRJJXwUv/y\nxGSO8akLoa1tV2ZOZou3snMr+UI5ORKzyW01TFoTZdLDfx3lV0kVGdEZzBSy\nwpqJ\r\n=jZqg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDdXGf1uzEagA0WT8z/a1PXvUXRwaZ6yaudz2zgQrLavQIhAN/b7VCIvpZcGKnKAhNIUHuk2nQpDIbB9/85mcPzXoKQ"}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/joi-json_2.1.0_1538001922001_0.597241437442638"},"_hasShrinkwrap":false},"3.0.0":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"3.0.0","main":"lib/index.js","keywords":["validation","joi","json","schema","validator"],"scripts":{"test":"nyc mocha 'lib/**/__tests__/*' --recursive"},"nyc":{"check-coverage":true,"include":["lib/**/*.js"],"reporter":["lcov","text"]},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^1.1.0"},"peerDependencies":{"joi":"^14.3.1"},"devDependencies":{"chai":"^4.1.2","nyc":"^14.1.1","freshy":"^1.0.2","joi":"^14.3.1","mocha":"^6.2.2","proxyquire":"^2.1.3","require-blocker":"^1.0.0","sinon":"^7.5.0"},"gitHead":"a49ac8c0ec1f62f3e35232d101334bac90c6a9b1","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@3.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.12.1","dist":{"integrity":"sha512-mcaONEtGaH4EtwxeLYrg28rriWH+TJUEKHfTmbOWlYMlW1fNU9nnt6shOoE40IKuA38pxYMwxD6Zps3vvhT3jA==","shasum":"8906312e851850a1f598d05c111aaf909ad11377","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-3.0.0.tgz","fileCount":16,"unpackedSize":16877,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwLBzCRA9TVsSAnZWagAAt20P/REgJ0Fkx6MsuLTs5XmH\ngstON2wYeHuDyNy/Byc5397XucPN9DOFlcdst79n03dYaUpaiPMgMtF3T1tJ\nX6OD2Q3zQw4r3HEjeabnfSU/ySmHStc5q/62UrtNw+RXOf0yOHdi97ldukdt\ni/aduMXEJFvnEbUcyXfYPfVvVQNCsO1sFCWpZCqptXEL+aqcZK6rYE63G8Kk\nz2WN60pIzwfasMUBQa2cMZQ72LfRFqDwHZkVxZ8hBz2CQRTap20j09ZY1/vO\nffRMKtQ2ygFXsENWpC5au8czEdDIhvFHKL+QFSZSMXTAYmgtttSVO5gIOeRw\nGTz+k9E87+wW0ObuiCcZo5otnlO59mmdlzWOcSy+Mum8JtkLXxcmZHNJBZ3k\nBWm/Qu6IKJvcsz33dOQcchyk+UdDwbGmcf6OI/PhDq/DVsP9XjVe+fDC/FNE\nwL67xmkZ1IXaYlH+PENy7Pd/e8JnAt+fV/lVRn1ZCHGGsSM1GnEQAPld/2Fa\no+QKG1sGzgsv1pZD3xYqh+vpXFlRInzlIN7kT0zX5FVHut0x9MtN+MlxD+Vc\nCuR4BHNiRvxGKIr5JNcE54bX0LrDl7L084HCfcH4JEJ4uk9jZmPBHQHNMjm3\nzgXOgTOh2HOqfn+20Vgf9XhZ6wztult0/u6faAzfkk4fA6OXW2FwupZ56GNH\n61YV\r\n=f/2b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDV8FHD1ga0nFXSOjz51nfPe9JQLpsc42UzZKdM/NbaHAiA9GaarIv84uQXXwLPd42PIIL31ZHsS/Ii3/+lpcodKxg=="}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/joi-json_3.0.0_1572909171362_0.9444447197627175"},"_hasShrinkwrap":false},"4.0.0-beta1":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"4.0.0-beta1","main":"lib/index.js","keywords":["validation","joi","json","schema","validator"],"scripts":{"test":"nyc mocha 'lib/**/__tests__/*' --recursive"},"nyc":{"check-coverage":true,"include":["lib/**/*.js"],"reporter":["lcov","text"]},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^2.0.0"},"peerDependencies":{"@hapi/joi":"*"},"devDependencies":{"chai":"^4.1.2","nyc":"^14.1.1","freshy":"^1.0.2","@hapi/joi":"^16.1.8","mocha":"^6.2.2","proxyquire":"^2.1.3","require-blocker":"^1.0.0","sinon":"^7.5.0"},"readme":"[![Build Status](https://travis-ci.org/vandium-io/joi-json.svg?branch=master)](https://travis-ci.org/vandium-io/joi-json)\n[![npm version](https://badge.fury.io/js/joi-json.svg)](https://badge.fury.io/js/joi-json)\n\n# Joi-JSON\n\nCreates [Joi](https://github.com/hapijs/joi) based object schemas from JSON.\n\n## Features\n\n* Create Joi schemas from JSON data\n* Express simple schemas using a single string\n* Lightweight with minimal dependencies\n* Compatible with most of the Joi API\n* Node.js 10.x compatible for use in AWS Lambda environments\n* Supports `@hapi/joi` implementation\n\n## Installation\n\nInstall via npm.\n\n\tnpm install joi-json --save\n\n\n**Note**: `@hapi/joi` needs to be installed into your project\n\n## Getting Started\n\n```js\nconst builder = require( 'joi-json' ).builder();\n\nlet jsonSchema = {\n\n    firstName: 'string:min=1,max=60,required',  // string using string-based notation\n\n    lastName: { // string using object notation\n\n        '@type': 'string',\n        min: 1,\n        max: 60,\n        required: true\n    },\n\n    address: {  // address is an object (i.e. joi.object() )\n\n        street: 'string:min=1,max=80,required',\n        street2: 'string:min=1,max=80',\n        city: 'string:min=1,max=40,required',\n        state: 'string:min=1,max=40,required',\n        postal: 'string:min=1,max=20,required',\n\n        '@required': true   // needs the '@' to indicate that \"required\" is a property\n    },\n\n    // alternative values (i.e. joi.alternatives().try() )\n    favNumberOrWord: [\n\n        'string:min=1,max=10',\n        'number:min=0,max=100'\n    ]\n};\n\nlet schema = builder.build( jsonSchema );\n```\n\nWhich would yield the equivalent to the following `joi` schema:\n\n```js\n\nconst joi = require( '@hapi/joi' );\n\nlet schema = {\n\n    firstName: joi.string().min(1).max(60).trim().required(),\n\n    lastName: joi.string().min(1).max(60).trim().required(),\n\n    address: Object.keys( {\n\n            street: joi.string().min(1).max(80).trim().required(),\n            street2: joi.string().min(1).max(80).trim(),\n            city: joi.string().min(1).max(40).trim().required(),\n            state: joi.string().min(1).max(40).trim().required(),\n            postal: joi.string().min(1).max(20).trim().required()\n\n        }).required(),\n\n    favNumberOrWord: [\n\n            joi.string().min(1).max(10).trim(),\n            joi.number().min(1).max(100)\n        ]\n};\n```\n\n## Documentation\n\nFor information on how to use Joi-JSON, please see our [API documentation](docs)\n\n\n## Feedback\n\nWe'd love to get feedback on how to make this tool better. Feel free to contact us at `feedback@vandium.io`\n\n\n## License\n\n[BSD-3-Clause](https://en.wikipedia.org/wiki/BSD_licenses)\n","readmeFilename":"README.md","gitHead":"2d9e322194b46769cf4db56eb0af54226a967ac4","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@4.0.0-beta1","_nodeVersion":"10.16.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-hpBL04mw1ZJFxlUWsPYllFbqnxAndVEiLfMtx+nUTzOacB0hWFZnbUEMCqu5iWt9FbPZYGOKo/3Fn6P0RgtkEg==","shasum":"76220bca93d2ca2b1b824ef7fe6b53d4bb89cce0","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-4.0.0-beta1.tgz","fileCount":16,"unpackedSize":16803,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5ZfTCRA9TVsSAnZWagAANxkQAJC5qvT5KjGoLqVPaGij\n4r4K7sw9DNrF/dyxqIjNPBBAA0JRmmBTxAKXLo4xYrqXBn5KxMejtu/jH6EZ\n5xazd5S5TSlLVVvcjgJrHnfxcaTilWgsOwFuz6GeDfPpAHwe9K+oIFRlQhHu\n5q3zkUPHm4+W/52mmU5NJymvmiZdiNT842v+qd/CWYpD/nm2YS4t4PEKD14l\n+1rLfV5EfcCEY7ZXIoNVxbggNqJVg2KmtN3Znyp6bIxLDeGQ3sjOS8zqUi+z\ncrXwqqUXiaVg2C++Wj8vCCbHSIzCeFY2LTA97T8+JabpcbswXslPjCVaXcZe\nuzFOCg1dvWSJhS+/VWUKWJVMVY0cDOVqsaJuVCyhTT1iQqkpziEKE3BMUHcS\nj+zOv2qaApDgNvQ6mPo7pLMLB9oDl4tDSvz8rxoXes9iWkFipO2P0XSdI98W\nLrCdRXEyDkFqnXs8BHiG0bc2s/ZnHaitL8NfjzhRYrbbe2FpvztUnJ9UXacV\nkzhhptqOSJES+AO2beqYnoW+KKgE0dyYfLDErRVsH8BlkrYqmcMIzJhCUTxF\nIviv8CggKW78w50qlKW4wmoaVXgDgwhkjkkv2I0tT92zkd4iIrwFc5FGrTML\ntsA+G9XtiQFClklo+peml0RR38Z0Ol63ub9rnv08h4rBCORYsq4CdoMSytrF\n71V5\r\n=Yz2U\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAbdyU9KyBb+xEKH4c34ac39sA9dTj7MFCqaTnpKbuvOAiBiuREYBQAJFBs/6tAeUD66NyrAVZsoPVvmrFpdcOfRbg=="}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/joi-json_4.0.0-beta1_1575327698587_0.7647067368330065"},"_hasShrinkwrap":false},"4.0.0":{"name":"joi-json","description":"Builds Joi schemas from JSON objects","version":"4.0.0","main":"lib/index.js","keywords":["validation","joi","json","schema","validator"],"scripts":{"test":"nyc mocha 'lib/**/__tests__/*' --recursive"},"nyc":{"check-coverage":true,"include":["lib/**/*.js"],"reporter":["lcov","text"]},"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"license":"BSD-3-Clause","dependencies":{"vandium-utils":"^2.0.0"},"peerDependencies":{"@hapi/joi":"*"},"devDependencies":{"chai":"^4.1.2","nyc":"^14.1.1","freshy":"^1.0.2","@hapi/joi":"^16.1.8","mocha":"^6.2.2","proxyquire":"^2.1.3","require-blocker":"^1.0.0","sinon":"^7.5.0"},"gitHead":"b72de36fcf4b18d6682ae02b6c233e9217f1795c","bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"homepage":"https://github.com/vandium-io/joi-json#readme","_id":"joi-json@4.0.0","_nodeVersion":"10.16.0","_npmVersion":"6.13.1","dist":{"integrity":"sha512-uIG0A/yT8c1qsam1LOCMq/RRvp+WR9dAr9UsONDpk68/7xb6MX8Qan27LHM7z18HIJF7CyfMxL/mqLclXSbyiA==","shasum":"3b2c068bf28c3cd2878ea2abe19fa89812d2061e","tarball":"https://registry.npmjs.org/joi-json/-/joi-json-4.0.0.tgz","fileCount":16,"unpackedSize":16804,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6AXJCRA9TVsSAnZWagAAnwgP/R5VHc87nNoV2bkxfRQq\nawf2Du8WDlWE5TdU43gggMvBC7CrMMZM8nJWrczd09840MUxmOMA6XpvbRnA\nfznzFr3s/fRTkCFVsFcnDrZSoJSCrXV3xJ4DfecTc5xrzBhCVkVTpBNOWuJp\nPwu6qfF4W8xHxzABOJv2CmZRSgReH7A4i2ipUOOEjDnQjyczemsLtTkjBhlv\nSBQwPFwHPlGsBC+Yi+z6g9qO866srrvVVz0aYFnAhLbsEvrxc83UoFKbj28f\nB1jZTlH6wB0/XoUDBLxGbgaxdFlyXQs3yOOxJ0JxSuTxxLCAFaTkrIhuJpZp\ns96IKylJukQvhBnFlrjWnkV1up2qrtITxNQH/OpXnQJY/lWyQR2ObxXIh/x+\nIz5g4wisNTN8xeG+Jbd58jRU6HQ2O0qrlDwxzWtgCKTZKwuXahaHZgqLDMbi\ndcFEuItwatFIQN9Y22xDY6+GgqJgwoO47VEpBJkIMSxpfNOIy8gvhGWeyFbH\nRY9EGVPpd7jDLAQpMagZv4TyWDgqgs0OnNjfzdOHJSDHeT7tG5qAfHf4yuTM\nvTtbOEAr+BQupSO96CHCqWirFUGRiXQ6CtKKW4phS7HJaoh5gCHrwBMe1jmF\nHHkvDbP/OBQOR5cInPD6nlJA8jwgCLViA1UhjVu1q9CZxLS4FHi/ENZ368Gi\nA15r\r\n=HQYQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDu08idRPEb64+SjmXtOOplWdeEvYh1CLW/qOVYLf4RRAiA9iUPgQjRbO0UsC8pTCAiQUGsdq5D2kAOxubKEEJZ8mw=="}]},"maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"_npmUser":{"name":"richardhyatt","email":"richard@vandium.io"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/joi-json_4.0.0_1575486920902_0.03167132449381804"},"_hasShrinkwrap":false}},"readme":"[![Build Status](https://travis-ci.org/vandium-io/joi-json.svg?branch=master)](https://travis-ci.org/vandium-io/joi-json)\n[![npm version](https://badge.fury.io/js/joi-json.svg)](https://badge.fury.io/js/joi-json)\n\n# Joi-JSON\n\nCreates [Joi](https://github.com/hapijs/joi) based object schemas from JSON.\n\n## Features\n\n* Create Joi schemas from JSON data\n* Express simple schemas using a single string\n* Lightweight with minimal dependencies\n* Compatible with most of the Joi API\n* Node.js 10.x compatible for use in AWS Lambda environments\n* Supports `@hapi/joi` implementation\n\n## Installation\n\nInstall via npm.\n\n\tnpm install joi-json --save\n\n\n**Note**: `@hapi/joi` needs to be installed into your project\n\n## Getting Started\n\n```js\nconst builder = require( 'joi-json' ).builder();\n\nlet jsonSchema = {\n\n    firstName: 'string:min=1,max=60,required',  // string using string-based notation\n\n    lastName: { // string using object notation\n\n        '@type': 'string',\n        min: 1,\n        max: 60,\n        required: true\n    },\n\n    address: {  // address is an object (i.e. joi.object() )\n\n        street: 'string:min=1,max=80,required',\n        street2: 'string:min=1,max=80',\n        city: 'string:min=1,max=40,required',\n        state: 'string:min=1,max=40,required',\n        postal: 'string:min=1,max=20,required',\n\n        '@required': true   // needs the '@' to indicate that \"required\" is a property\n    },\n\n    // alternative values (i.e. joi.alternatives().try() )\n    favNumberOrWord: [\n\n        'string:min=1,max=10',\n        'number:min=0,max=100'\n    ]\n};\n\nlet schema = builder.build( jsonSchema );\n```\n\nWhich would yield the equivalent to the following `joi` schema:\n\n```js\n\nconst joi = require( '@hapi/joi' );\n\nlet schema = {\n\n    firstName: joi.string().min(1).max(60).trim().required(),\n\n    lastName: joi.string().min(1).max(60).trim().required(),\n\n    address: Object.keys( {\n\n            street: joi.string().min(1).max(80).trim().required(),\n            street2: joi.string().min(1).max(80).trim(),\n            city: joi.string().min(1).max(40).trim().required(),\n            state: joi.string().min(1).max(40).trim().required(),\n            postal: joi.string().min(1).max(20).trim().required()\n\n        }).required(),\n\n    favNumberOrWord: [\n\n            joi.string().min(1).max(10).trim(),\n            joi.number().min(1).max(100)\n        ]\n};\n```\n\n## Documentation\n\nFor information on how to use Joi-JSON, please see our [API documentation](docs)\n\n\n## Feedback\n\nWe'd love to get feedback on how to make this tool better. Feel free to contact us at `feedback@vandium.io`\n\n\n## License\n\n[BSD-3-Clause](https://en.wikipedia.org/wiki/BSD_licenses)\n","maintainers":[{"name":"richardhyatt","email":"richard@vandium.io"}],"time":{"modified":"2022-06-19T04:42:16.773Z","created":"2016-06-22T22:52:58.125Z","1.0.0":"2016-06-22T22:52:58.125Z","1.0.1":"2016-07-25T16:17:56.191Z","1.1.0":"2016-07-26T14:51:15.316Z","2.0.0":"2016-08-03T00:47:34.815Z","2.0.1":"2016-08-03T18:21:21.806Z","2.1.0":"2018-09-26T22:45:22.228Z","3.0.0":"2019-11-04T23:12:51.483Z","4.0.0-beta1":"2019-12-02T23:01:38.712Z","4.0.0":"2019-12-04T19:15:21.262Z"},"homepage":"https://github.com/vandium-io/joi-json#readme","keywords":["validation","joi","json","schema","validator"],"repository":{"type":"git","url":"git+https://github.com/vandium-io/joi-json.git"},"author":{"name":"Vandium Software, Inc."},"bugs":{"url":"https://github.com/vandium-io/joi-json/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md","users":{"lassevolkmann":true,"vparaskevas":true}}