about summary refs log tree commit diff
path: root/bskyembed/src/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'bskyembed/src/utils.ts')
-rw-r--r--bskyembed/src/utils.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/bskyembed/src/utils.ts b/bskyembed/src/utils.ts
deleted file mode 100644
index cfa4a525b..000000000
--- a/bskyembed/src/utils.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import {AtUri} from '@atproto/api'
-
-export function niceDate(date: number | string | Date) {
-  const d = new Date(date)
-  return `${d.toLocaleDateString('en-us', {
-    year: 'numeric',
-    month: 'short',
-    day: 'numeric',
-  })} at ${d.toLocaleTimeString(undefined, {
-    hour: 'numeric',
-    minute: '2-digit',
-  })}`
-}
-
-export function getRkey({uri}: {uri: string}): string {
-  const at = new AtUri(uri)
-  return at.rkey
-}
-
-const formatter = new Intl.NumberFormat('en-US', {
-  notation: 'compact',
-  maximumFractionDigits: 1,
-  roundingMode: 'trunc',
-})
-
-export function prettyNumber(number: number) {
-  return formatter.format(number)
-}