forked from nostr/nostrweb
utils: import directly from utils
it is not worth to import everything from utils, as there are too many functions, better import them directly from each module.
parent
495e755844
commit
70fb0da35a
|
@ -1,5 +1,5 @@
|
|||
import {Event} from 'nostr-tools';
|
||||
import {zeroLeadingBitsCount} from './utils';
|
||||
import {zeroLeadingBitsCount} from './utils/crypto';
|
||||
|
||||
export const isMention = ([tag, , , marker]: string[]) => tag === 'e' && marker === 'mention';
|
||||
export const hasEventTag = (tag: string[]) => tag[0] === 'e';
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import {generatePrivateKey, getEventHash, getPublicKey, nip19, signEvent} from 'nostr-tools';
|
||||
import {zeroLeadingBitsCount} from './utils/crypto';
|
||||
import {elem, elemCanvas, elemShrink, parseTextContent} from './utils/dom';
|
||||
import {bounce, dateTime, formatTime} from './utils/time';
|
||||
import {getHost, getNoxyUrl, isWssUrl} from './utils/url';
|
||||
import {sub24hFeed, subNote, subProfile} from './subscriptions'
|
||||
import {publish} from './relays';
|
||||
import {getReplyTo, hasEventTag, isMention, sortByCreatedAt, sortEventCreatedAt, validatePow} from './events';
|
||||
import {clearView, getViewContent, getViewElem, setViewElem, view} from './view';
|
||||
import {bounce, dateTime, elem, elemCanvas, elemShrink, formatTime, getHost, getNoxyUrl, isWssUrl, parseTextContent, zeroLeadingBitsCount} from './utils';
|
||||
// curl -H 'accept: application/nostr+json' https://relay.nostr.ch/
|
||||
|
||||
function onEvent(evt, relay) {
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
export {zeroLeadingBitsCount} from './crypto';
|
||||
export {elem, elemCanvas, elemShrink, parseTextContent} from './dom';
|
||||
export {bounce, dateTime, formatTime} from './time';
|
||||
export {getHost, getNoxyUrl, isHttpUrl, isWssUrl} from './url';
|
|
@ -1,4 +1,4 @@
|
|||
import {elem} from './utils';
|
||||
import {elem} from './utils/dom';
|
||||
|
||||
type Container = {
|
||||
id: string;
|
||||
|
|
Loading…
Reference in New Issue