Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor (pubsub, localDatastore, peerId) {
this._pubsub = pubsub
this._subscriptions = {}
// Bind _handleSubscriptionKey function, which is called by PubsubDatastore.
this._handleSubscriptionKey = this._handleSubscriptionKey.bind(this)
this._pubsubDs = new PubsubDatastore(pubsub, localDatastore, peerId, ipns.validator, this._handleSubscriptionKey)
}
selector: (k, records) => ipns.validator.select(records[0], records[1])
}
func: (key, record, cb) => ipns.validator.validate(record, key, cb)
},