{"_id":"json-schema-defaults","_rev":"20-4f8d3ee7ca4580a569fcba06f9d7de90","name":"json-schema-defaults","description":"Generate JSON object from default values in JSON Schema","dist-tags":{"latest":"0.4.0"},"versions":{"0.0.1":{"name":"json-schema-defaults","version":"0.0.1","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"./node_modules/.bin/jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","ignore":["test"],"devDependencies":{"karma":"~0.12.14","jasmine-node":"mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"_id":"json-schema-defaults@0.0.1","dist":{"shasum":"9a3f48e774ca9c55af2844b7374eb013f6371491","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.0.1.tgz","integrity":"sha512-WFl6XSdJQM9YyFz3jJhGSCgE7LcfY8BVQNRdoglGktkd4i1qtkkfUP3fiJ9Qt3i6uRTGvKZ6miTgSsGtwI6i3w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCV+GXzgWGW9i0kJFB5ivL7ca8AXRbeEpNcqKOZl+xqywIgFLtEQ7lLcZKSBGHUh9NY3TnXi42CwcH0ql+EVXFAwBU="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"directories":{}},"0.0.2":{"name":"json-schema-defaults","version":"0.0.2","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"./node_modules/.bin/jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"karma":"~0.12.14","jasmine-node":"mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"_id":"json-schema-defaults@0.0.2","dist":{"shasum":"0300bb6f704ac5f01a9e620d9f463692df1d556e","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.0.2.tgz","integrity":"sha512-AXoIbDsmb9eD/coIRgwn0/vM6oW4quwF9AsTBI0PLe4lcPLgApwenHOA2n/k0zN+HK/tuV4X0Tche80uVGOGgw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFIG0N5Mc6oi3CCxzIGSjL8VVLddLWbq9VRl+WcygekgAiBUn24L4uapk9/7ngaJPMmluMal1kMKC7RjXW2wAh+G7Q=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"directories":{}},"0.1.0":{"name":"json-schema-defaults","version":"0.1.0","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git@github.com:chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"karma":"~0.12.14","jasmine-node":"mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"gitHead":"71fd25f429096710ac951d042808f7a566d43c62","_id":"json-schema-defaults@0.1.0","_shasum":"d4eca181191de2570a5a72f6e2157e596b6e611d","_from":".","_npmVersion":"1.4.23","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"dist":{"shasum":"d4eca181191de2570a5a72f6e2157e596b6e611d","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.1.0.tgz","integrity":"sha512-/DSevqPEcRe/F3xl6ui3CehAFdiwFFj9aPJx3NXoN1DxudQ8EGBmvdPF7WzatdvFVl2UGHKBMuJ2oBaN4EZDrg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpB5WG97ym4jq5/mDKEgqVgeWdZLOpOeSFwbquSc5u+AiEA8BZcA5jnop9yc/cNyS173zMzCdJ3tLIhzpZUOk31HI4="}]},"directories":{}},"0.1.1":{"name":"json-schema-defaults","version":"0.1.1","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"https://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"karma":"~0.12.14","jasmine-node":"mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"gitHead":"a7b4fe7af67989817b40f041fadec1ec6fe589b8","_id":"json-schema-defaults@0.1.1","_shasum":"1c6c6103c4349b71b6f4aa382c3dd9aa1c8bada3","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"dist":{"shasum":"1c6c6103c4349b71b6f4aa382c3dd9aa1c8bada3","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.1.1.tgz","integrity":"sha512-6Q5YS7pSDCXUbtS9uAFE+uUgvE45dBHCMyhqe6liJmL+oIa4zbACSS6nr6Lh+73mN+MnWBCExtN3C14S7Jrm7w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPsL1H/WEWuiKBuCIx7o2YZr0ec7oG8P+DqChtCXDX6AIhAP0+IOLBX41w5l7PziOFnwHSqfHE2z6JKxfb2YtxzBgz"}]},"directories":{}},"0.2.0":{"name":"json-schema-defaults","version":"0.2.0","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git+https://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"karma":"~0.12.14","jasmine-node":"github:mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"gitHead":"76c60dc467dee288df247bc527283963c3ba9924","_id":"json-schema-defaults@0.2.0","_shasum":"89ceb86ff0537dfbc1a6ddb52f2bd03efa85ff89","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"dist":{"shasum":"89ceb86ff0537dfbc1a6ddb52f2bd03efa85ff89","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.2.0.tgz","integrity":"sha512-Gsb7uvlyhldP+76k3rDK/i/Mnrxd6cEjKEa8TQBGMu7yZrLDV2l4zj/nBhbPLJAqBUacuJRupgHqABImtWi4+A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCWpqNxtAq/vBezSr6TX4mtj9bxNZAH7EFs+1NIuyPS5gIgK6TjcttquBP/tk4oGU3mNlQSk/VhyJGbEGVhnfVzFKc="}]},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/json-schema-defaults-0.2.0.tgz_1470698970016_0.11996007990092039"},"directories":{}},"0.3.0":{"name":"json-schema-defaults","version":"0.3.0","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git+https://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","scripts":{"test":"jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"karma":"~0.12.14","jasmine-node":"github:mhevery/jasmine-node#Jasmine2.0","karma-jasmine":"~0.1.5","karma-chrome-launcher":"~0.1.3","karma-firefox-launcher":"~0.1.3","karma-phantomjs-launcher":"~0.1.4","grunt":"~0.4.4","grunt-bump":"0.0.13","grunt-conventional-changelog":"~1.1.0","grunt-contrib-watch":"~0.6.1","grunt-contrib-jshint":"~0.10.0"},"gitHead":"451431ff375ca83264ee20cedb672dedfce568a5","_id":"json-schema-defaults@0.3.0","_shasum":"8dafda34c6b1a6627d856b7eafad764c0f39db6b","_from":".","_npmVersion":"3.8.6","_nodeVersion":"5.11.1","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"dist":{"shasum":"8dafda34c6b1a6627d856b7eafad764c0f39db6b","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.3.0.tgz","integrity":"sha512-3bN7Lz4CodpSvynpJX+Kf2e2Y0yQFmPbLS0IZ/JGzyxOsGSmm0m98aoCRMvrriA5GzzNdJODHJcP+/M7RToGWA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7w2+23I/xaQzjp/tuew4UKeumYQ2PnG7uSEsnPo5IfwIgHxzhFM4MGrtEyWmBfc2F65z1HiXoWs3f2/YSowGldZI="}]},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/json-schema-defaults-0.3.0.tgz_1482779621196_0.2384445716161281"},"directories":{}},"0.4.0":{"name":"json-schema-defaults","version":"0.4.0","description":"Generate JSON object from default values in JSON Schema","homepage":"https://github.com/chute/grunt-json-schema-defaults","author":{"name":"Chute","email":"hello@getchute.com"},"repository":{"type":"git","url":"git+https://github.com/chute/json-schema-defaults.git"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"main":"index.js","bin":{"json-schema-defaults":"bin/defaults.js"},"scripts":{"test":"jasmine-node test/ && ./node_modules/karma/bin/karma start --single-run"},"keywords":["json","schema"],"license":"MIT","devDependencies":{"grunt":"^1.0.1","grunt-bump":"^0.8.0","grunt-contrib-jshint":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-conventional-changelog":"^6.1.0","jasmine-core":"^2.6.2","jasmine-node":"^1.14.5","karma":"^1.7.0","karma-chrome-launcher":"^2.1.1","karma-firefox-launcher":"^1.0.1","karma-jasmine":"^1.1.0","karma-phantomjs-launcher":"^1.0.4"},"dependencies":{"argparse":"^1.0.9"},"gitHead":"f273781bf2d76c5353b4a23f505c0ea7574316b9","_id":"json-schema-defaults@0.4.0","_npmVersion":"5.6.0","_nodeVersion":"8.9.3","_npmUser":{"name":"petrbela","email":"github@petrbela.com"},"dist":{"integrity":"sha512-UsUrkDVNvHTneyeQOYHH9ZHb3+6OjwYfJ831SdO0yjtXtYZ7Jh8BKWsuJYUQW7qckP5JhHawsg4GI6A5fMaR/Q==","shasum":"b63ee7e7aa83f29b54cb31d31ecddeb056c3306c","tarball":"https://registry.npmjs.org/json-schema-defaults/-/json-schema-defaults-0.4.0.tgz","fileCount":12,"unpackedSize":115166,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB4uNftzYc0hsR+XuEcEC5ORCuGzESuiIqXmYT+Mb0efAiBBWh6DWxKl3Z60YodyZfppa9Bskfuul0lJNJ0aEud1Gg=="}]},"maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/json-schema-defaults_0.4.0_1518496229213_0.6368724304151341"},"_hasShrinkwrap":false}},"readme":"# JSON Schema Defaults  [![Build Status](https://travis-ci.org/chute/json-schema-defaults.svg?branch=master)](https://travis-ci.org/chute/json-schema-defaults)\n\n> Generate JSON object from default values in JSON Schema\n\nWorks both in node and browser.\n\n## Installation\n\n- npm\n\n  ```sh\n  npm install json-schema-defaults\n  ```\n\n- bower\n\n  ```sh\n  bower install json-schema-defaults\n  ```\n\n- manual\n\n  Download [lib/defaults.js](lib/defaults.js)\n\n## Usage\n\n- CommonJS (node.js)\n\n  ```js\n  var defaults = require('json-schema-defaults');\n  defaults({ ... });\n  ```\n\n- RequireJS\n\n  ```js\n  // in require.js config\n  paths: {\n    'defaults': './path/to/lib/defaults.js'\n  }\n\n  // in a file\n  define(['defaults'], function(defaults) {\n    defaults({ ... });\n  });\n  ```\n\n- standalone\n\n  ```js\n  window.jsonSchemaDefaults({ ... });\n  ```\n\n  If the standalone version causes any conflict with existing `jsonSchemaDefaults` global variable,\n  you can return back the original variable:\n\n  ```js\n  var defaults = window.jsonSchemaDefaults.noConflict();\n  // `window.jsonSchemaDefaults` now points to the original variable\n  // `defaults` points to this script\n  defaults({ ... });\n  ```\n\n- CLI\n\n  If installed globally:\n\n  ```sh\n  json-schema-defaults schema.json\n  ```\n\n  If locally:\n\n  ```sh\n  ./node_modules/.bin/json-schema-defaults schema.json\n  ```\n\n  Custom indentation (defaults to 2):\n\n  ```sh\n  json-schema-defaults --indent 4 schema.json\n  ```\n\n  Write into a file:\n\n  ```sh\n  json-schema-defaults schema.json > defaults.json\n  ```\n\n## Documentation\n\nCall `defaults` with JSON Schema. The default values will be extracted as a JSON.\n\n```js\nvar json = defaults({\n  \"title\": \"Album Options\",\n  \"type\": \"object\",\n  \"properties\": {\n    \"sort\": {\n      \"type\": \"string\",\n      \"default\": \"id\"\n    },\n    \"per_page\": {\n      \"default\": 30,\n      \"type\": \"integer\"\n    }\n  }\n});\n\n// would return\n{\n  sort: 'id',\n  per_page: 30\n}\n```\n\nFor more examples, see the tests.\n\n\n## Development\n\nRun tests\n\n```sh\nnpm test\n```\n\nOr individually\n\n```sh\n# in node\n./node_modules/.bin/jasmine-node test/\n\n# in browser\n./node_modules/karma/bin/karma start\n```\n\n\n## Contributors\n\n* Eugene Tsypkin @jhony-chikens\n\n\n## License\n\n(c) 2015 Chute Corporation. Released under the terms of the MIT License.\n","maintainers":[{"name":"petrbela","email":"github@petrbela.com"}],"time":{"modified":"2022-06-19T06:23:41.808Z","created":"2014-04-29T00:28:41.948Z","0.0.1":"2014-04-29T00:28:42.497Z","0.0.2":"2014-05-04T22:21:37.683Z","0.1.0":"2015-01-30T18:59:42.853Z","0.1.1":"2015-03-17T09:09:28.494Z","0.2.0":"2016-08-08T23:29:32.009Z","0.3.0":"2016-12-26T19:13:43.346Z","0.4.0":"2018-02-13T04:30:30.048Z"},"readmeFilename":"README.md","homepage":"https://github.com/chute/grunt-json-schema-defaults","keywords":["json","schema"],"repository":{"type":"git","url":"git+https://github.com/chute/json-schema-defaults.git"},"author":{"name":"Chute","email":"hello@getchute.com"},"bugs":{"url":"https://github.com/chute/json-schema-defaults/issues"},"license":"MIT","users":{}}