MCPcopy Create free account
hub / github.com/OpenPipe/OpenPipe / truthyFilter

Function truthyFilter

app/src/utils/utils.ts:3–3  ·  view source on GitHub ↗
(x: T | null | undefined)

Source from the content-addressed store, hash-verified

1import { type Entries } from "type-fest";
2
3export const truthyFilter = <T>(x: T | null | undefined): x is T => Boolean(x);
4
5export const formatFileSize = (bytes: number, decimals = 2) => {
6 if (bytes === 0) return "0 Bytes";

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected