{"_id":"@viviedu/type-proxy","_rev":"28-2d9a4d29fe0bebeeb95189aaaf30e85a","name":"@viviedu/type-proxy","dist-tags":{"latest":"2.0.8"},"versions":{"1.0.7":{"name":"@viviedu/type-proxy","version":"1.0.7","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@1.0.7","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"andrewjpritchardvivi","email":"andrew@vivi.io"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"0f4aca830f25e2aaeba3f0d9e59290e978a13278","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-1.0.7.tgz","fileCount":15,"integrity":"sha512-8GFeEaHQYTwJMdZAlch+lkonvsu5Yog3+Ajx6alI0a+SMXXH9ap+OyhzihbXjhrw+KbDgiwgJFJWPtN0a3TG8Q==","signatures":[{"sig":"MEUCIEGXjQtiXjl7G7FE1Wm/DnOoz+xkgxzzCjfXhsbFxvnjAiEAsd9iaY1lu5vT2UFVXx5ggYaek9p+nXlG+k6tn176kFc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24992,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjW3EgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr9ZQ//SK9dohpl2ULWcPpSEWrab/SSRKkIR73gZhjX6+PCeBpK02WN\r\nfhC4jAwTZsKv+0QEUZuZvTWHUHuo1ai96dACrIK46TBuU3Y/a+MpIwSElFWx\r\nn9aQGfMcE/cJ8dFOcLGDogR50Vl/5RI8FePrThdW9IVRrfbkSuIPZyVOIhRn\r\nC/pKASSsSIn8IDzBSjbTiTS/OEjT4zsiKsa6r84SFXiTtl7UyGbNYsx+Kt3I\r\nezDissI0f0YqCowMowkEEo9jq5NJI7+KzaFKkg3DyMacaAxnIP7jKX27aUNi\r\nCXK63FphJQOHCdAX+3CxBRqHG8Tv9JSL6QJydRZG4xKDjhLUAlmuJFXd70In\r\nDv4sU/GiwndIzmJuGKEIsYpMa0nz6E+dEhwI4GFSlSwiRgqTjM8G7ZOfiQEt\r\n85r0IKGPwieweyij5+XlK1rTd1xPCRjcLi6ByuZe1AMDBe1HfOTtr0cdIaok\r\nGw9UIJajFJzoYs4U5bV3GbdEg6pGnPG2njXSD3/5tWfVjqSUlhZhp9t2TwrE\r\nY2zW8vCkn4q5n+dBquO+1nF68s0ODKFVJMDTTn//6vhv7UCVRdgOamT+IuC3\r\nUeEzjux0ZGDG5e6ZkFNN+NDNSXT6FqSHmPYYGsIH4oz9Yiy+jhxy2UyyDAuU\r\nWj3q5NLCwA5g3BwFlK776OwQ7muaPGQVHRQ=\r\n=4Ir2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"a8aaab2ea0d444b1537b32e1430ffd5e596ab8ab","private":false,"scripts":{"test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"eslint . && tsc","prepare":"tsc"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"6.14.17","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"14.20.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.3.0","ts-node":"^10.7.0","typescript":"^4.5.2","@types/node":"^18.11.5","@types/mocha":"^10.0.0","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_1.0.7_1666937120103_0.3996811832563931","host":"s3://npm-registry-packages"}},"1.0.8":{"name":"@viviedu/type-proxy","version":"1.0.8","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@1.0.8","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"5a0f73ea5000aa1b4286d751fce98d6d8f6def7e","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-1.0.8.tgz","fileCount":15,"integrity":"sha512-zOdysLSEVYpH8kCRfGgAf+IMd1RW6nErm5+zZlp8zsF6ZTE0IxkkzxfagaO5KWH2CMLqo8iaHq9caU/xQ8ya9Q==","signatures":[{"sig":"MEUCIQCE16AzZoOhvrT176MY4ult5NELfS0eC1RVZRuJhq/F8gIgdQJ6jUO9+q3Q6B/8Z6SPsX7mpe+D+LYPrv/it1e6AKk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25375},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"94af4a9dc493d83c74273f217312685a8a458445","private":false,"scripts":{"test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"eslint . && tsc","prepare":"tsc"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"9.5.1","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.16.0","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.3.0","ts-node":"^10.7.0","typescript":"^4.5.2","@types/node":"^18.11.5","@types/mocha":"^10.0.0","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_1.0.8_1708584469222_0.5306880744259401","host":"s3://npm-registry-packages"}},"1.0.9":{"name":"@viviedu/type-proxy","version":"1.0.9","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@1.0.9","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"4ad5106bacd5913d84a96f230262ecf7229cc4d7","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-1.0.9.tgz","fileCount":15,"integrity":"sha512-vJTG+fz2Gijnr8mfIIDShN0gvJVmvzMVYx1X7UD8V+zRwEhyXEKUkvJpMH6KqdTyKPhJthMlfLzXOA679yYXDw==","signatures":[{"sig":"MEUCIQDTx4ni1K0+2+ZXKemvF6ZMtzpTb1enW3P6lwKfTzN7LgIgZhmoWg11A+JA51sDt6sLybQjuNlfCPQdh0RaUoEjznE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26846},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"644628391bf6f5df5022afe7ca01b33d90089f43","private":false,"scripts":{"test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"eslint . && tsc","prepare":"tsc"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.3.0","ts-node":"^10.7.0","typescript":"^4.5.2","@types/node":"^18.11.5","@types/mocha":"^10.0.0","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_1.0.9_1720136851892_0.40594664576302675","host":"s3://npm-registry-packages"}},"1.0.10":{"name":"@viviedu/type-proxy","version":"1.0.10","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@1.0.10","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"453bc1649dfa2453a0120aa9be11390ef7a279ab","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-1.0.10.tgz","fileCount":15,"integrity":"sha512-c8MmzFIgbPLrZ9qtSceN9wTZggXk09wwkeuwNMpQEtEa+ya8gRxLyPgk9F6bnEqA/aPbcUK5VjmxRRHYAER4Ig==","signatures":[{"sig":"MEUCIQC/qbBMRojhIVeD7x2SRPlxfl+pcBI4K+JCc95wL66vXQIgHKXPXvThW++EgIqrk8hFdWkVEw8wF1vqLJAWA9YhBKE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27648},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"85edd06091ea5d02c12bd9592b3e7e877c8c8427","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^4.5.2","@types/node":"^18.11.5","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_1.0.10_1720337979267_0.263238509871913","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@viviedu/type-proxy","version":"2.0.0","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.0","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"ba3b54ae3940318b383b741d2925264db1de5fa7","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.0.tgz","fileCount":15,"integrity":"sha512-XPZ33ajVWXFY9yw5xNVjGoPwiogvxjfziceh29uMMy+/Mdpb0S9RPIX1nS2uo9rXKG1U16niG//m/VUB7HmIbA==","signatures":[{"sig":"MEUCIDqqa1RRCKuMyQHYe4vz6MVjpUmtuW9lEhttpugvfrJWAiEA1sbYQdsjAi4FJl13CNbTMqY4COfQNt3cmuvrB9n9YqI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27594},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e1affc337139a2c0f36fda26cb6d2d68488e5c32","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"deanylev","email":"npm@deanlevinson.com.au"},"_npmVersion":"10.5.0","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.14.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.0_1726454204879_0.4710396970352353","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@viviedu/type-proxy","version":"2.0.1","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.1","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"73e6c4fe12799aabf510f48ae6c13f6c0b854204","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.1.tgz","fileCount":15,"integrity":"sha512-06LoWssbc8KzJHHPJ5iiYLNDJi2opPJNJythdQ6wxO7X2IiUnasILqsWCc/T4+sNrdYgeRJ6COvMOhnweNmz4w==","signatures":[{"sig":"MEUCIQC4USLJrpJji3zvOz80LtLCMBXlukIW3Pk2HRmR5Y4hkAIgcOd/sayzc9qzvx15CM5V4D6/3GAWRXTHddOjkf3ZwrQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27740},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"6e44b54f3d8f9fc891587e06899d337330c002b3","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"deanylev","email":"npm@deanlevinson.com.au"},"_npmVersion":"10.5.0","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"20.12.2","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.14.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.1_1726464162353_0.4943051071611493","host":"s3://npm-registry-packages"}},"2.0.2":{"name":"@viviedu/type-proxy","version":"2.0.2","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.2","maintainers":[{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"dubistkomisch","email":"jakerodneybarnes@gmail.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"a5d8d721c3c65d0a6642d905d68f13d6eb8ff115","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.2.tgz","fileCount":17,"integrity":"sha512-mHfkei8h3B+xuzyISyF8rUmmXaQHVOPHV+BDZtWUtfgw3wnEpPB0JT7901SOf/tClLF9uvAUL5Vge5BzbiBfAg==","signatures":[{"sig":"MEUCIQCm14OhVkAi0ksGJ+wStuMbpc13+pAomKnmbj58DEQVSAIgb9aCScAd596sOcCGAaE/fosDQeN2W/0ZjyFj4Rn9VN8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":30807},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"fd8eab330149d6c7ada505008ae6775362e42b8a","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.14.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.2_1728605083149_0.2247603472825812","host":"s3://npm-registry-packages"}},"2.0.3":{"name":"@viviedu/type-proxy","version":"2.0.3","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.3","maintainers":[{"name":"ethanhusband","email":"eth.husband@gmail.com"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"deanylev","email":"npm@deanlevinson.com.au"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"d73baeb492aa897c4e70a33bab5597ccd975f100","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.3.tgz","fileCount":19,"integrity":"sha512-eVn0PDAPz8jAwQXIRL8663rP9+wvyS2IkiVihp+qxV57uU1TkcQ2mn7i9O7TvKv32U0GtSfQZl5dRpefIqJrwQ==","signatures":[{"sig":"MEYCIQCfo+rar/Oid5MQLV3fdcjdkhsOn0FjOReiEuogGrgdVAIhAOj5083yuW008c3TvVXH0K9KMXH+usYjP5i+opZwnhiE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":31905},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"e3270076e13a9153f9415b2e74659047fe8727b3","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.14.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.3_1731901795393_0.48186387200405356","host":"s3://npm-registry-packages"}},"2.0.4":{"name":"@viviedu/type-proxy","version":"2.0.4","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.4","maintainers":[{"name":"deanylev","email":"npm@deanlevinson.com.au"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"ethanhusband","email":"eth.husband@gmail.com"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"4c65fa709a71754c5806118cb5d1587827d5f8cd","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.4.tgz","fileCount":19,"integrity":"sha512-Q0UxY1oYviHFW+A/q1rk3YSKZiEGsxJwJfqsjoi5X3RBf8C81kpVOYBnpUor37AaS8TQcHke9nYbPGhwfHMASg==","signatures":[{"sig":"MEUCIQCDlL8gCYR5fvPNHT6L0K3xIAeFtTWGPDczVinXnjm04gIgGeXIfzSA8nim4xWCB+gQHbIsSjLa+HnUSxA3WDdh1+w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32263},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"3b33cf4250bdea2ebb2b8a74cc8e2022b8059cb0","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.17.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.4_1734495202007_0.011423021901519892","host":"s3://npm-registry-packages-npm-production"}},"2.0.5":{"name":"@viviedu/type-proxy","version":"2.0.5","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.5","maintainers":[{"name":"deanylev","email":"npm@deanlevinson.com.au"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"ethanhusband","email":"eth.husband@gmail.com"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"20b2d24fdd1d20d5e7e9b6cd8207ed021d5d5f3c","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.5.tgz","fileCount":19,"integrity":"sha512-CBKVUSFaSH8HYn9ynidwSTiLCZCz6kw1l3/w41G8XYcmIjLA76cVtmnM9Bgpa6xeMXZAYNzJOgDcSXiqBaly2A==","signatures":[{"sig":"MEQCIFlNFxfm5si0BMQ4GPwf1O5bjDolcXg/3G1NAur9nJogAiAQ9Jr0DsS9g/uS+xdlvRxf9FbRAHzdpIOn6ujD0wjE6Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32535},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"78777b6031071bacbf596b76736481cc11c5975b","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.17.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.5_1744332571248_0.6413705217152865","host":"s3://npm-registry-packages-npm-production"}},"2.0.6":{"name":"@viviedu/type-proxy","version":"2.0.6","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.6","maintainers":[{"name":"deanylev","email":"npm@deanlevinson.com.au"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"ethanhusband","email":"eth.husband@gmail.com"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"0dc5b03265cc69a60aea9dd9dce9bda587036047","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.6.tgz","fileCount":19,"integrity":"sha512-wMM0DWfhMeLNODFFu8foYzvStBm+8yenP9cJ24o2YcXlDgN5VJTOqKD5LFSIKBqfsCDi4U2bTkMmZHORAxRe3A==","signatures":[{"sig":"MEQCICWEr0YhueuVz7+ehymb0M8Vg6sNoaba1gAfi71TxCl2AiAF77K3cu5Sl2YGLIcGn86kv07weB8ypaWWlQgswi9ioQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33081},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4840889e88801378c801f922adc6e716f81cac04","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"deanylev","actor":{"name":"deanylev","type":"user","email":"npm@deanlevinson.com.au"},"email":"npm@deanlevinson.com.au"},"_npmVersion":"10.8.2","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.20.7","_hasShrinkwrap":false,"packageManager":"yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e","devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.17.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.6_1752126292206_0.3577366648764957","host":"s3://npm-registry-packages-npm-production"}},"2.0.7":{"name":"@viviedu/type-proxy","version":"2.0.7","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.7","maintainers":[{"name":"deanylev","email":"npm@deanlevinson.com.au"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"ethanhusband","email":"eth.husband@gmail.com"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"6f6c609709f9476eb89601f3b64a4eda433c0255","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.7.tgz","fileCount":19,"integrity":"sha512-VTMN/E3EIMDbfqcEN6Okx/9IW8n3Y1Be6XltyusCeEvLp+0NQZ2NncmuyYmN4rUHlEU/JiCbEtk5sEoEpPbdZA==","signatures":[{"sig":"MEQCIE1ypxk9VMn46B3KHezr6jc15b2T2wRSmNQmvsLN8XSvAiBsqQBMLwYXxPizGtAVoKJunnMar0TWotGEpZEreLKfmA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33720},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"dfec1fff9897e2680e479a29e725c270c8f85282","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"tristanpenman","email":"tristan@tristanpenman.com"},"_npmVersion":"10.2.4","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.19.1","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.17.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.7_1753868367804_0.26810580512096704","host":"s3://npm-registry-packages-npm-production"}},"2.0.8":{"name":"@viviedu/type-proxy","version":"2.0.8","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"author":{"name":"Vivi International"},"license":"MIT","_id":"@viviedu/type-proxy@2.0.8","maintainers":[{"name":"deanylev","email":"npm@deanlevinson.com.au"},{"name":"tristanpenman","email":"tristan@tristanpenman.com"},{"name":"ethanhusband","email":"eth.husband@gmail.com"}],"homepage":"https://github.com/viviedu/type-proxy","dist":{"shasum":"f1bed49b3ad20300ec6f45b36646761c34c27fed","tarball":"https://registry.npmjs.org/@viviedu/type-proxy/-/type-proxy-2.0.8.tgz","fileCount":19,"integrity":"sha512-dmeVLaw+bxBekaBaTl86TaPYc0nTI4udQ9L19DrRfpXY1GKRp0XxpQY4dfX1t1WD8J1dvdHWCN+NepyJ5CZZ5w==","signatures":[{"sig":"MEQCIFyOfAG0HJx0q9yIGse1vojB1xlxSR9kt+QJRXdKx4ckAiA3BOnNrSSdLFkMUiWTnxya54dvJuasLHtYg0zhXa3MhQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":33716},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c422286e8141cfef10caef7640ef7bfafae576b9","private":false,"scripts":{"lint":"eslint src --max-warnings 0","test":"yarn build && mocha --require ts-node/register test/**/*.ts test/**/*.js","build":"yarn lint && tsc","prepare":"tsc","lint:fix":"eslint src --max-warnings 0 --fix"},"_npmUser":{"name":"deanylev","email":"npm@deanlevinson.com.au"},"_npmVersion":"10.8.2","description":"Validate data with unknown structure","directories":{},"_nodeVersion":"18.20.7","_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.1.0","eslint":"^8.38.0","ts-node":"^10.7.0","typescript":"^5.5.3","@types/node":"^20.17.10","@types/mocha":"^10.0.0","eslint-plugin-import":"^2.29.1","@typescript-eslint/parser":"^5.4.0","@typescript-eslint/eslint-plugin":"^5.4.0","eslint-import-resolver-typescript":"^3.6.1"},"_npmOperationalInternal":{"tmp":"tmp/type-proxy_2.0.8_1754888650362_0.5216318735282515","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2022-10-28T06:05:20.049Z","modified":"2026-04-22T02:44:03.868Z","1.0.6":"2022-10-28T05:14:51.098Z","1.0.7":"2022-10-28T06:05:20.396Z","1.0.8":"2024-02-22T06:47:49.391Z","1.0.9":"2024-07-04T23:47:32.015Z","1.0.10":"2024-07-07T07:39:39.432Z","2.0.0":"2024-09-16T02:36:45.029Z","2.0.1":"2024-09-16T05:22:42.613Z","2.0.2":"2024-10-11T00:04:43.341Z","2.0.3":"2024-11-18T03:49:55.646Z","2.0.4":"2024-12-18T04:13:22.203Z","2.0.5":"2025-04-11T00:49:31.477Z","2.0.6":"2025-07-10T05:44:52.419Z","2.0.7":"2025-07-30T09:39:27.979Z","2.0.8":"2025-08-11T05:04:10.533Z"},"author":{"name":"Vivi International"},"license":"MIT","homepage":"https://github.com/viviedu/type-proxy","keywords":["parse","parser","parsing","validate","validator","validation","unknown","typescript","combinator","json","interface","schema"],"description":"Validate data with unknown structure","maintainers":[{"email":"tristan@tristanpenman.com","name":"tristanpenman"},{"email":"mattd@vivi.io","name":"mattdvivi"},{"email":"jasdeepg@vivi.io","name":"jasdeepg-vivi"},{"email":"athir.saleem@gmail.com","name":"noc7c9"},{"email":"berke.batmaz@gmail.com","name":"berkebat"},{"email":"development@vivi.io","name":"vivinews"}],"readme":"[![License: MIT](https://img.shields.io/badge/License-MIT-blue?style=flat-square)](LICENSE)\n\n# Type Proxy\n\nValidate unknown data types using a low overhead syntax.\n\n## Quickstart\n\nDon't write an ordinary TypeScript interface:\n\n```typescript\ninterface Nested {\n  e: 'hello'\n  f: 2\n}\n\ninterface MyStruct {\n  a: string;\n  b: number;\n  c: Array<boolean>;\n  d: Nested;\n}\n```\n\nUse the type proxies instead:\n\n```typescript\nimport { arrayP, numberP, numLiteralP, objectP, stringP, strLiteralP } from 'type-proxy';\n\nconst nestedP = objectP({\n  e: strLiteralP('hello'),\n  f: numLiteralP(2)\n});\n\nconst myStructP = objectP({\n  a: stringP,\n  b: numberP,\n  c: arrayP(booleanP),\n  d: nestedP\n});\n```\n\nYou get data validation for free. Type proxies can be used in plain JavaScript without any trouble:\n\n```typescript\n// Returns the following:\n// {\n//   success: true,\n//   value: <Original Data>\n// }\nmyStructP({\n  a: 'type proxies',\n  b: 42,\n  c: [true, false],\n  d: { e: 'hello', f: 2 },\n});\n```\n\nIf something goes wrong, you get helpful messages telling you what happened:\n\n```typescript\n// Returns the following:\n// {\n//   success: false,\n//   error: ParseError\n// }\nconst result = myStructP({\n  a: 'type proxies',\n  b: 42,\n  c: [true, false],\n  d: { e: 'goodbye', f: 2 },\n});\n\n// prints `data.d.e is invalid. We expected \"hello\" but found \"goodbye\" instead.`\nconsole.log(result.error.display())\n```\n\nTypeScript users can derive their types from the proxies for free:\n\n```typescript\nimport { GetType } from 'type-proxy';\n\n// both of these types are equivalent to MyStruct above\ntype MyStructType = GetType<typeof myStructP>;\ninterface MyStructInterface extends GetType<typeof myStructP> {}\n```\n\n## Description\n\nThe `type-proxy` package allows you to derive a validation function for free. At its simplest, a validation function takes some unknown data and returns a value of the type you want to validate:\n\n```typescript\ntype Validator<X> = (data: unknown) => X | null;\n```\n\n`type-proxy` uses a slightly more complicated validator function that we call `TypeProxy`:\n\n```typescript\nexport type TypeProxy<T> = (data: unknown) => ParseResult<T>;\n\nexport type ParseResult<T> = {\n  success: true,\n  value: T\n} | {\n  success: false,\n  error: ParseError\n};\n```\n\nA `TypeProxy` is therefore a function that takes some unknown data and validates it. On success, it returns the value. On failure, it returns an error.\n\n### Motivation\n\nWhile writing web applications, we frequently come across data that is of an unknown type. This is the kind of data that usually comes from a HTTP request, a file, or some other unstructured stream of data. In order to validate that this data is correct, the traditional method is to write a validation function which often looks something like this:\n\n```typescript\ninterface MyStruct {\n  a: number,\n  b: string\n}\n\nconst validate = (data: unknown): MyStruct | null => {\n  if (typeof data !== 'object' || data === null) {\n    return null;\n  }\n\n  if (typeof (data as { a: unknown}).a !== 'number') {\n    return null;\n  }\n\n  if (typeof (data as { b: unknown}).b !== 'string') {\n    return null;\n  }\n\n  return data as MyStruct;\n}\n```\n\nThis ad hoc strategy is tedious, verbose and error-prone. In TypeScript this often calls for lots of casts, which can often make it relatively unsafe. Instead of writing out the validation function every time, it would be nice to derive the validation function from the interface declaration.\n\n### Use cases\n\nThere are many places that we can encounter data of an unknown type:\n\n```typescript\n// JSON.parse\nconst { body } = await fetch('http://example.com');\nconst data = JSON.parse(body);\n\n// Event handlers\nemitter.on('event', (data) => {\n  // ...\n});\n\n// Poorly typed external APIs\nconst data = functionThatReturnsAny();\n```\n\n### Alternatives\n\nBefore you use this library, there are several alternatives that should consider using instead.\n\nThese include (with their respective headlines):\n\n* [Zod](https://zod.dev/) - TypeScript-first schema validation with static type inference.\n* [Valibot](https://valibot.dev/) - Validate unknown data with Valibot, the open source schema library with bundle size, type safety and developer experience in mind.\n* [Yup](https://github.com/jquense/yup) - Yup is a schema builder for runtime value parsing and validation.\n\nAll three are published under the [MIT License](https://opensource.org/license/mit), and are mature and well tested. Between them they have over 50 thousand stars on GitHub.\n\n**Reasons you should NOT use this library:**\n\n* **Not Invented Here (NIH)**: This library was initially developed as a minimal validation interface for use in projects at [Vivi](https://vivi.io). Despite being aware of publicly available alternatives, we decided to release this code as is.\n\n* **Test Coverage**: Test coverage is still somewhat lacking, however we hope to improve this... 🙏\n\n* **Completeness**: The alternatives listed above are arguably more complete from a type system perspective. They provide well established solutions for parsing and validating complex types.\n\n**Why you might want to use this library:**\n\n* **Compactness**: One of the advantages over alternatives is that `type-proxy` is extremely small, and light-weight. The entire API _and_ implementation can easily be explained in a short how-to session / tutorial.\n\n* **Extensibility**: The `type-proxy` API has been designed to be easy to extend and compose.\n\n## Advanced usage\n\n### Generic types\n\nGeneric types are supported, but you may need to specify a TypeScript interface for ergonomic reasons. Consider the following types:\n\n```typescript\ntype Pair<F, S> = {\n  first: F,\n  second: S\n};\n\ntype Either<L, R> = {\n  type: 'left',\n  left: L\n} | {\n  type: 'right',\n  right: R\n};\n```\n\nWe can write a type proxy for generic types using functions that take type proxies as parameters:\n\n```typescript\nconst pairP = <F, S>(firstP: TypeProxy<F>, secondP: TypeProxy<S>) => objectP({\n  first: firstP,\n  second: secondP\n});\n\nconst eitherP = <L, R>(leftP: TypeProxy<L>, rightP: TypeProxy<R>) => orP(\n  objectP({\n    type: strLiteralP('left'),\n    left: leftP\n  }),\n  objectP({\n    type: strLiteralP('right'),\n    right: rightP\n  })\n);\n```\n\nThe types of the type proxy can be derived as per normal:\n\n```typescript\nconst numberStringPairP = pairP(numberP, stringP);\nconst numberOrStringP = eitherP(numberP, stringP);\n\ntype NumberStringPair = GetType<typeof numberStringPairP>;\ntype NumberOrString = GetType<typeof numberOrStringP>;\n```\n\nIt can be shown that these new types are the same as the types we had before:\n\n```typescript\nconst assertType = <T>(value: T) => {};\nassertType<TypeProxy<Pair<number, string>>>(numberStringPairP);\nassertType<TypeProxy<Either<number, string>>>(numberOrStringP);\n```\n\nThe only limitation is that we cannot derive generic types from type proxies. For example: we can use `GetType` on `pairP(numberP, stringP)` to get `Pair<number, string>`, but we can not use `GetType` on `pairP` to get `Pair<F, S>`.\n\n### Recursive types\n\nWhen using recursive types using TypeScript, you must specify a TypeScript interface:\n\n```typescript\ntype LinkedList = {\n  value: number,\n  next: LinkedList\n} | null;\n```\n\nYou cannot write your type proxy like you would normally, since it will use a variable that has not yet been defined:\n\n```typescript\nconst linkedListP = orP(\n  objectP({\n    value: numberP,\n    next: linkedListP // Error: Block-scoped variable 'linkedListP' used before its declaration.\n  }),\n  nullP\n);\n```\n\nYou can however, write out recursive types as a function. Note that for recursive types, the type declaration is required otherwise TypeScript will not be able to resolve the type:\n\n```typescript\nconst linkedListP: TypeProxy<LinkedList> = (value: unknown) => orP(\n  objectP({\n    value: numberP,\n    next: linkedListP\n  }),\n  nullP\n)(value);\n\nconst list = { value: 1, next: { value: 2, next: { value: 3, next: null }}};\nassert(linkedListP(list).success);\n```\n\n### Transforms\n\nSome experimental support for object transforms has been included.\n\nAn example of this is `snakeCaseObjectP`. This can be used to parse a payload that contains [`snake_case`](https://en.wikipedia.org/wiki/Snake_case) keys, while returning a type that includes those keys as specified in a type proxy. `snakeCaseObjectP` is designed to be used in place of `objectP`.\n\nExample:\n```typescript\nconst userP = snakeCaseObjectP({\n  userName: stringP,\n  emailAddress: stringP\n});\n\nconst data = {\n  user_name: 'Foo',\n  email_address: 'foo@example.com',\n};\n\nconst result = userP(data);\n\nassert(result.success);\nassert(result.value.userName);\n```\n\n## API\n\nThis section is incomplete. Please raise an issue on GitHub if you would like something to be added.\n\n### `labelP`\n\nChanges the error message to include a human readable label.\n\n```typescript\nconst noLabel = numLiteralP(1809);\nassert.equal(noLabel(2022).success, false);\n\n// The following prints:\n//\n//  data is invalid. We expected 1809 but found 2022 instead.\nconsole.log(noLabel(2022).error.display());\n\nconst withLabel = labelP('Araham Lincoln\\'s birthday', numLiteralP(1809));\nassert.equal(withLabel(2022).success, false);\n\n// The following prints:\n//\n//  data is invalid. We expected Araham Lincoln's birthday but found 2022 instead.\n//  it is not Araham Lincoln's birthday because:\n//    data is invalid. We expected 1809 but found 2022 instead.\nconsole.log(WithLabel(2022).error.display());\n```\n\nThis is useful for when you want more descriptive error messages when describing a union. In the following example, the error message is not very useful:\n\n```javascript\nconst unionP = orP(\n  objectP({\n    type: strLiteralP('number'),\n    number: numberP\n  }),\n  objectP({\n    type: strLiteralP('string'),\n    string: stringP\n  }),\n  objectP({\n    type: strLiteralP('boolean'),\n    boolean: booleanP\n  })\n);\n\nconst result = unionP({ type: 'number', string: 'hello' });\nassert.equal(result.success, false);\n// prints \"data is invalid. We found {\"type\":\"number\",\"string\":\"hello\"}.\"\nconsole.error(result.error.display());\n```\n\nhowever, if we add labels to each variant, we get much better error messages:\n\n\n```javascript\nconst unionP = orP(\n  labelP('a number type', objectP({\n    type: strLiteralP('number'),\n    number: numberP\n  })),\n  labelP('a string type', objectP({\n    type: strLiteralP('string'),\n    string: stringP\n  })),\n  labelP(' a boolean type', objectP({\n    type: strLiteralP('boolean'),\n    boolean: booleanP\n  }))\n);\n\nconst result = unionP({ type: 'number', string: 'hello' });\nassert.equal(result.success, false);\n// prints the following:\n//\n// data is invalid. We expected a number type, a string type or  a boolean type but found {\"type\":\"number\",\"string\":\"hello\"} instead.\n// it is not a number type because:\n//   data.number is invalid. We expected a number but found undefined instead.\n// it is not a string type because:\n//   data.type is invalid. We expected \"string\" but found \"number\" instead.\n// it is not  a boolean type because:\n//   data.type is invalid. We expected \"boolean\" but found \"number\" instead.\nconsole.error(result.error.display());\n```\n\n### `validate`\n\nParses a value and returns the result. If the value cannot be parsed, an error is thrown with a description as the error message.\n\n```typescript\nconst string = validate('hello', stringP);\nassert(string === 'hello');\n\ntry {\n  const string = validate(3, stringP);\n  assert(false);\n} catch (error) {\n  assert.equal(error.message, 'data is invalid. We expected a string but found 3 instead.');\n}\n```\n\n## Development\n\nFor local development, the library can be built with `yarn build`. This will run eslint and run the TypeScript compiler.\n\nThe linter can be run independently with `yarn lint`, or `yarn lint:fix` to automatically fix some errors.\n\nTests can be run with `yarn test`.\n\n## License\n\nThis project has been published under the MIT License.\n\nSee the LICENSE file for more information.\n","readmeFilename":"README.md"}