src/providers.js
function writeProviderEntry (store, cid, peer, time, callback) {
  const dsKey = [
    makeProviderKey(cid),
    '/',
    utils.encodeBase32(peer.id)
  ].join('')

  store.put(new Key(dsKey), Buffer.from(varint.encode(time)), callback)
}
function writeProviderEntry (store, cid, peer, time, callback) {
  const dsKey = [
    makeProviderKey(cid),
    '/',
    utils.encodeBase32(peer.id)
  ].join('')

  store.put(new Key(dsKey), Buffer.from(varint.encode(time)), callback)
}
function writeProviderEntry ( store , cid , peer , time , callback ) { const dsKey = [ makeProviderKey ( cid ) , '/' , utils . encodeBase32 ( peer . id ) ] . join ( '' ) store . put ( new Key ( dsKey ) , Buffer . from ( varint . encode ( time ) ) , callback ) }
Write a provider into the given store.

@param {Datastore} store
@param {CID} cid
@param {PeerId} peer
@param {number} time
@param {function(Error)} callback
@returns {undefined}

@private
Write a provider into the given store .