PageSourceSearch

https://furryr.is-a.dev/static/js/util/promise.ts

js furryr.is-a.dev collected 2026-10-09 22:07:48 UTC 441 bytes, 17 lines download raw bytes

1export type Resolver<T> = {
2  promise: Promise<T>
3  resolve: (value: T | PromiseLike<T>) => void
4  reject: (reason?: unknown) => void
5}
6
7export function withResolvers<T = void>(): Resolver<T> {
8  let resolveFn!: Resolver<T>['resolve']
9  let rejectFn!: Resolver<T>['reject']
10  return {
11    promise: new Promise((resolve, reject) => {
12      ;[resolveFn, rejectFn] = [resolve, reject]
13    }),
14    resolve: resolveFn,
15    reject: rejectFn
16  }
17}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.