MCPcopy Create free account
hub / github.com/tinyplex/tinybase / getIfNotFunction

Function getIfNotFunction

src/common/other.ts:8–14  ·  view source on GitHub ↗
(predicate: (value: unknown) => value is unknown)

Source from the content-addressed store, hash-verified

6
7const getIfNotFunction =
8 (predicate: (value: unknown) => value is unknown) =>
9 <Value, Return>(
10 value: Value | null | undefined,
11 then: (value: Value) => Return,
12 otherwise?: () => Return,
13 ): Return | undefined =>
14 predicate(value) ? /* istanbul ignore next */ otherwise?.() : then(value);
15
16export const GLOBAL = globalThis;
17export const WINDOW = GLOBAL.window;

Callers 1

other.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…