OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-booking / node_modules / hyperdht / browser.js

16 lines · javascript ref:
const { hash, createKeyPair } = require('./lib/crypto')

module.exports = class Stub {
  constructor() {
    throw new Error('hyperdht is not supported in browsers')
  }

  static keyPair(seed) {
    return createKeyPair(seed)
  }

  static hash(data) {
    return hash(data)
  }
}