commonjs import for ramda.
This commit is contained in:
parent
c03f8d1c56
commit
0e1c23a3f9
4
pool.js
4
pool.js
|
@ -1,8 +1,8 @@
|
|||
import R from 'ramda'
|
||||
|
||||
import {getEventHash, signEvent} from './event'
|
||||
import {relayConnect, normalizeRelayURL} from './relay'
|
||||
|
||||
const R = require('ramda')
|
||||
|
||||
export function relayPool(globalPrivateKey) {
|
||||
const relays = {}
|
||||
const globalSub = []
|
||||
|
|
3
relay.js
3
relay.js
|
@ -1,9 +1,10 @@
|
|||
import 'websocket-polyfill'
|
||||
import R from 'ramda'
|
||||
|
||||
import {verifySignature} from './event'
|
||||
import {sha256} from './utils'
|
||||
|
||||
const R = require('ramda')
|
||||
|
||||
export function normalizeRelayURL(url) {
|
||||
let [host, ...qs] = url.split('?')
|
||||
if (host.slice(0, 4) === 'http') host = 'ws' + host.slice(4)
|
||||
|
|
Loading…
Reference in New Issue