{"_id":"jungles-types","_rev":"29-93cf59bb069eee4294d265a851a23d55","name":"jungles-types","description":"Combines the datalayer and validators for jungles","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"jungles-types","version":"1.0.0","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.7.1","jungles-data-memory":"~3.0.2"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.0.0","dist":{"shasum":"50a9da9522d8346fb180acaba6e5eaf04e65751a","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.0.0.tgz","integrity":"sha512-1+De+7ngrOoSgj9aWEcGOKv2O+1AqkoZTX9rYFqCVgyhRWhTz22u2eGtwj7Qq8GWkp7Oazkf6lbEALiArbWCYw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAkxt+LHcrQH3OsIGcb+rroXWwwTL2b/r8kx/xfHhFpHAiEA8bPLCUHimulNgGGcjDxrD+sPOk+fRn0UUldgjRl5wFM="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.0":{"name":"jungles-types","version":"1.1.0","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.7.1","jungles-data-memory":"~3.0.2","async":"~0.2.3"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.1.0","dist":{"shasum":"07c6ee05476c8eb2d8965e267c4b2dac8c3d3dc6","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.1.0.tgz","integrity":"sha512-k4CAAtTLRDzItmJYt1HPMB0VhFSDpK/3Hec8QF2kSO6KgJby7atjXaCWTJ6ysvx9eWY80hdMs0ZYX6IvCo2qRw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICw0Ab9d0QJK8pk4CKGwB33hPZVZhtraad+6wsipidKiAiBE4MUKROv8nLpcac39c5ZURC/h+ol0toROT4ILv/4a2w=="}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.1.1":{"name":"jungles-types","version":"1.1.1","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.7.1","jungles-data-memory":"~3.0.2","async":"~0.2.3"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.1.1","dist":{"shasum":"cfd9d7bfd0503e07157604e1acca6caae8454bcc","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.1.1.tgz","integrity":"sha512-dBtbvNBkc/BYUeJ3YfIIQFkgEooXDF8IrfjrhyG4KC4QNMnXXKG2FFBY31p+bJBYad4cYkpkhnR/0YOc0H7NCA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD53zgmsijlQa4oKW9NUBLz8YfQa6JUIEYHsW6mIb+t1gIhAKipS7O/XY7+4ZKqqVSX1wNysG+PQumwzJb6oBTOcz5x"}]},"_from":".","_npmVersion":"1.2.2","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.2.0":{"name":"jungles-types","version":"1.2.0","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.7.1","jungles-data-memory":"~3.0.2","async":"~0.2.3","kwery":"~1.2.0"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.2.0","dist":{"shasum":"4a9b5ca518a7605a54f88210d7c6d0540a835a36","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.2.0.tgz","integrity":"sha512-uxl0crXROHto1phl15wkGjPaVghjLAG13PfUa+B7uJ4jJVvsH7xwo/dRaBLuwPM7xDUALLqdAWlFtEwcSfRA1w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5WzKW2D7km34ZSRJo3+w5+wD013yDfWiKtQULYrNAzAiBfb1O1L9FQO1//3qxq06rtlKzaodhtA6//3ekDC+RDug=="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.2.1":{"name":"jungles-types","version":"1.2.1","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.7.1","jungles-data-memory":"~3.0.2","async":"~0.2.3","kwery":"~1.2.0"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.2.1","dist":{"shasum":"b0962b0f3fb51da41cb355b2474b749183f152cc","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.2.1.tgz","integrity":"sha512-Ryb/26UzWyUK45iFKKMzqFStNxu3Q6R7fGN2TaQ210TQ7EiqREorLUxX3OKZMFo8HyJQgKwFAKPXEeIDuxWOpw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDUMZpZzgdkxKnfBHYHSJ3dUuVBdr5LhW3UUyEeqDFMQwIgTWq0LlA2ugixuoDcn2WxiAHVmvOtLQtSUThp9HSVGgo="}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.2.2":{"name":"jungles-types","version":"1.2.2","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"~1.0.0","jungles-validators":"~1.8.0","async":"~0.2.3"},"devDependencies":{"jungles-data-memory":"~3.1.0","kwery":"~1.2.0"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.2.2","dist":{"shasum":"3604d1ec40d813ac76d7d51c785847265122d741","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.2.2.tgz","integrity":"sha512-U+3Y13ztjhdsctKzX0jF4zX4X4fbMXfjEI9RCrOi/jaW5u2EFgOLbOi+Nxm/lGiNYwBe0ejHJpxZzriwbVw2Gg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7iAg0mXLFPdodOGnjBFU84I0RUDDQ48WUuA38IUDSZAIhANp/WYDgqq+vDtqiYZjVCCkzPLgeqRdmKxYwFCnF4YF7"}]},"_from":".","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"directories":{}},"1.3.0":{"name":"jungles-types","version":"1.3.0","description":"Combines the datalayer and validators for jungles","main":"index.js","author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"},"keywords":["jungles","validation","validators","data"],"dependencies":{"underscore":"~1.4.4","jungles-validation":"*","jungles-validators":"*","async":"~0.2.3"},"devDependencies":{"jungles-data-memory":"~3.1.0","kwery":"~1.2.0"},"readme":"# Types\n\nThis module puts the validation layer infront of data.create, data.update and data.copy. So you don't always have to manually call validate when updating or creating data. \n\n## Create\n\n```js\nvar dal = require('jungles-data-memory')([]);\nvar settings = [ /* array with your types and schemas */ ];\n\nvar t = types(settings, dal).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n## Update\n\n```js\nvar dal = require('jungles-data-memory')([]);\nvar settings = [ /* array with your types and schemas */ ];\nvar t = types(settings, dal).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object(s)\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n## Copy\n\n```js\nvar dal = require('jungles-data-memory')([]);\nvar settings = [ /* array with your types and schemas */ ];\nvar t = types(settings, dal).copy({ path: '/snowboard', parent: '/' });\n\nt.success(function (response) {\n  // response is the created object(s)\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","readmeFilename":"README.md","_id":"jungles-types@1.3.0","dist":{"shasum":"c1b515ec4a199d8a17100bfab3aa1e546b89a459","tarball":"https://registry.npmjs.org/jungles-types/-/jungles-types-1.3.0.tgz","integrity":"sha512-OYlS5kIDvbpdkOA+TteOhuD0of0YP+1a82PpHyXUGG2Txw5k0EM/SNtAWZMSeE5yacjFxiE3T8YX6WJ26RGfkw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHS8JwDxKC+iw1Tu5uMu8h2RmTlFcx+r2/26QReXUXSwAiBGApNFsZ32So87nnGQVugp1OjMlCfTZzJhohlzms7y4w=="}]},"_from":"types","_npmVersion":"1.2.15","_npmUser":{"name":"enome","email":"geert.pasteels@gmail.com"},"maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}]}},"readme":"# Types\n\nThis module puts the validation layer infront of data.create and data.update. So you don't always have to manually call validate when updating or creating data. This will be used by the rest layer in the future so we have one place to create and update data + validation.\n\n## API\n\n\n### Create\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).create({ name: 'snowboard', type: 'product' });\n\nt.success(function (response) {\n  // response is the created object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n\n### Update\n\n```js\nvar data = require('jungles-data-memory');\nvar t = types(settings, data([])).update({ path '/snowboard', name: 'skateboard' });\n\nt.success(function (response) {\n  // response is the updated object\n});\n\nt.error(function (errors) {\n  // errors are validation errors\n});\n```\n","maintainers":[{"name":"enome","email":"geert.pasteels@gmail.com"}],"time":{"modified":"2022-06-19T07:21:18.581Z","created":"2013-02-06T17:58:30.709Z","1.0.0":"2013-02-06T17:58:32.485Z","1.1.0":"2013-02-06T21:07:55.305Z","1.1.1":"2013-02-07T16:26:06.618Z","1.2.0":"2013-04-04T19:35:57.283Z","1.2.1":"2013-04-21T15:33:09.281Z","1.2.2":"2013-04-21T17:21:14.190Z","1.3.0":"2013-06-15T18:43:26.593Z"},"author":{"name":"Geert Pasteels","email":"geert.pasteels@gmail.com"}}