sflow
Version:
sflow is a powerful and highly-extensible library designed for processing and manipulating streams of data effortlessly. Inspired by the functional programming paradigm, it provides a rich set of utilities for transforming streams, including chunking, fil
13 lines (11 loc) • 361 B
text/typescript
import DIE from "phpdie";
export class CacheHitError extends Error {
constructor(...args: ConstructorParameters<typeof Error>) {
super(...args);
this.name = "CacheHitError";
}
static nil: (reason: unknown) => PromiseLike<null> | null = (error) =>
error instanceof CacheHitError
? null
: DIE(error as Parameters<typeof DIE>[0]);
}