src/decentralizer.js
// method to store data via ipfs
method to store data via ipfs
method to store data via ipfs
async addData(data) {
    if (!data || typeof data !== "string") {
      return false;
    }
    const [{ hash }] = await this._ipfs.add(data);
    return hash;
  }
async addData ( data ) { if ( ! data || typeof data !== "string" ) { return false ; } const [ { hash } ] = await this . _ipfs . add ( data ) ; return hash ; }
method to store data via ipfs
method to store data via ipfs
// make sure we're saving something valid // add content and return hash