Rename everything to welshman
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type {Event, EventTemplate, UnsignedEvent} from 'nostr-tools'
|
||||
export type {Event, EventTemplate, UnsignedEvent} from 'nostr-tools'
|
||||
import {verifyEvent, getEventHash} from 'nostr-tools'
|
||||
import {cached, now} from '@coracle.social/lib'
|
||||
import {cached, now} from '@welshman/lib'
|
||||
import {Tags} from './Tags'
|
||||
import {addressFromEvent, encodeAddress} from './Address'
|
||||
import {isEphemeralKind, isReplaceableKind, isPlainReplaceableKind, isParameterizedReplaceableKind} from './Kinds'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {Event} from 'nostr-tools'
|
||||
import {matchFilter as nostrToolsMatchFilter} from 'nostr-tools'
|
||||
import {prop, avg, hash, groupBy, randomId, uniq} from '@coracle.social/lib'
|
||||
import {prop, avg, hash, groupBy, randomId, uniq} from '@welshman/lib'
|
||||
import type {Rumor} from './Events'
|
||||
import {decodeAddress, addressFromEvent, encodeAddress} from './Address'
|
||||
import {isReplaceableKind} from './Kinds'
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import {kinds} from 'nostr-tools'
|
||||
import {between} from '@coracle.social/lib'
|
||||
|
||||
export const isRegularKind = kinds.isRegularKind
|
||||
export const isEphemeralKind = kinds.isEphemeralKind
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# @welshman/util [](https://npmjs.com/package/@welshman/util)
|
||||
|
||||
Some nostr-specific utilities. For the most part, these will not have side effects or manage state.
|
||||
|
||||
- `Address` utilities for dealing with nostr addresses.
|
||||
- `Events` utilities for dealing with nostr events.
|
||||
- `Filters` utilities for dealing with nostr filters.
|
||||
- `Kinds` kind constants and related utility functions.
|
||||
- `Links` utilities for encoding and decoding nostr links.
|
||||
- `Relay` an implementation of an in-memory nostr relay.
|
||||
- `Relays` utilities related to relay urls.
|
||||
- `Router` is a utility for selecting relay urls based on user preferences and protocol hints.
|
||||
- `Tags` convenient way to access and modify tags.
|
||||
- `Zaps` utilities related to zaps.
|
||||
@@ -1,4 +1,4 @@
|
||||
import {Emitter, uniq, omit, now, range, identity, pushToMapKey} from '@coracle.social/lib'
|
||||
import {Emitter, uniq, omit, now, range, identity} from '@welshman/lib'
|
||||
import {matchFilters, matchFilter} from './Filters'
|
||||
import {encodeAddress, addressFromEvent} from './Address'
|
||||
import {isReplaceable} from './Events'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {normalizeUrl, stripProtocol} from '@coracle.social/lib'
|
||||
import {normalizeUrl, stripProtocol} from '@welshman/lib'
|
||||
|
||||
export const isShareableRelayUrl = (url: string) =>
|
||||
Boolean(
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {first, splitAt, identity, sortBy, uniq, shuffle, pushToMapKey} from '@coracle.social/lib'
|
||||
import {Tags, Tag} from '@coracle.social/util'
|
||||
import {first, splitAt, identity, sortBy, uniq, shuffle, pushToMapKey} from '@welshman/lib'
|
||||
import {Tags, Tag} from '@welshman/util'
|
||||
import type {Rumor} from './Events'
|
||||
import {getAddress, isReplaceable} from './Events'
|
||||
import {isShareableRelayUrl} from './Relays'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {EventTemplate} from 'nostr-tools'
|
||||
import type {OmitStatics} from '@coracle.social/lib'
|
||||
import {Fluent, ensurePlural, last} from '@coracle.social/lib'
|
||||
import type {OmitStatics} from '@welshman/lib'
|
||||
import {Fluent, ensurePlural, last} from '@welshman/lib'
|
||||
import {isShareableRelayUrl, normalizeRelayUrl} from './Relays'
|
||||
import type {Address} from './Address'
|
||||
import {encodeAddress, decodeAddress} from './Address'
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type {Event} from 'nostr-tools'
|
||||
import {hexToBech32} from '@coracle.social/lib'
|
||||
import {hexToBech32} from '@welshman/lib'
|
||||
import {Tags} from "./Tags"
|
||||
|
||||
const DIVISORS = {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "@coracle.social/util",
|
||||
"version": "0.0.9",
|
||||
"name": "@welshman/util",
|
||||
"version": "0.0.1",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "A collection of utilities.",
|
||||
"description": "A collection of nostr-related utilities.",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
@@ -32,7 +32,7 @@
|
||||
"typescript": "~5.1.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@coracle.social/lib": "0.0.6",
|
||||
"@welshman/lib": "0.0.1",
|
||||
"nostr-tools": "^2.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user