Constructor confugration options

This changes the function signature of the constructor but allows us to
pass any options.
Mainly this is now used for the ipfs configs.
This commit is contained in:
2018-04-23 11:01:08 +02:00
parent 1779d66ee6
commit 78b47753b3
2 changed files with 6 additions and 10 deletions

View File

@@ -5,7 +5,7 @@ class IPFS {
constructor(config) {
if (!config) {
config = {host: 'localhost', port: '5001', protocol: 'http'};
config = { host: 'localhost', port: '5001', protocol: 'http' };
}
this._ipfsAPI = ipfsAPI(config);
this._config = config;