Name: joi-ipfs-config
Owner: TABLEFLIP
Description: Validate JS-IPFS config
Created: 2018-02-28 12:18:44.0
Updated: 2018-02-28 12:56:17.0
Pushed: 2018-02-28 13:50:16.0
Homepage: null
Size: 214
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Validate JS-IPFS config
Your flexible IPFS config validating friend. The following rationale is applied here:
null
to be passed in its placeinstall joi-ipfs-config
t Joi = require('joi').extend(require('joi-ipfs-config'))
t config = {
nfig: {
Addresses: {
Swarm: [
'/ip4/0.0.0.0/tcp/4002',
'/ip4/127.0.0.1/tcp/4003/ws'
]
}
PERIMENTAL: {
pubsub: true,
dht: true
attempt(config, Joi.ipfsConfig()) // throws if invalid
Feel free to dive in! Open an issue or submit PRs.
MIT © Alan Shaw