{"id":18338812,"url":"https://github.com/tableflip/joi-ipfs-config","last_synced_at":"2025-04-09T20:35:55.812Z","repository":{"id":72910751,"uuid":"123280946","full_name":"tableflip/joi-ipfs-config","owner":"tableflip","description":"Validate JS-IPFS config","archived":false,"fork":false,"pushed_at":"2018-02-28T13:50:16.000Z","size":214,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-15T12:46:47.496Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tableflip.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-28T12:18:44.000Z","updated_at":"2018-02-28T12:56:17.000Z","dependencies_parsed_at":"2023-05-26T01:15:36.617Z","dependency_job_id":null,"html_url":"https://github.com/tableflip/joi-ipfs-config","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fjoi-ipfs-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fjoi-ipfs-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fjoi-ipfs-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tableflip%2Fjoi-ipfs-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tableflip","download_url":"https://codeload.github.com/tableflip/joi-ipfs-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248108399,"owners_count":21049127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T20:15:39.748Z","updated_at":"2025-04-09T20:35:55.781Z","avatar_url":"https://github.com/tableflip.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# joi-ipfs-config\n\n[![Build Status](https://travis-ci.org/tableflip/joi-ipfs-config.svg?branch=master)](https://travis-ci.org/tableflip/joi-ipfs-config)\n[![dependencies Status](https://david-dm.org/tableflip/joi-ipfs-config/status.svg)](https://david-dm.org/tableflip/joi-ipfs-config)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n\u003e Validate JS-IPFS config\n\nYour flexible IPFS config validating friend. The following rationale is applied here:\n\n1. This project shouldn't block new features landing in JS-IPFS. Object validation allows for unknown keys so that the feature can land, and validation for the config can be backfilled at a later date\n2. Where a config value is an object, we allow `null` to be passed in its place\n3. We are not in charge of defaults, that is for the module that uses the option to decide\n\n## Install\n\n```sh\nnpm install joi-ipfs-config\n```\n\n## Usage\n\n```js\nconst Joi = require('joi').extend(require('joi-ipfs-config'))\n\nconst config = {\n  config: {\n    Addresses: {\n      Swarm: [\n        '/ip4/0.0.0.0/tcp/4002',\n        '/ip4/127.0.0.1/tcp/4003/ws'\n      ]\n    }\n  },\n  EXPERIMENTAL: {\n    pubsub: true,\n    dht: true\n  }\n}\n\nJoi.attempt(config, Joi.ipfsConfig()) // throws if invalid\n```\n\n## Contribute\n\nFeel free to dive in! [Open an issue](https://github.com/tableflip/joi-ipfs-config/issues/new) or submit PRs.\n\n## License\n\n[MIT](LICENSE) © Alan Shaw\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fjoi-ipfs-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftableflip%2Fjoi-ipfs-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftableflip%2Fjoi-ipfs-config/lists"}