MCPcopy Create free account
hub / github.com/pollinations/pollinations / removeUnset

Function removeUnset

shared/util.ts:20–26  ·  view source on GitHub ↗
(obj: T)

Source from the content-addressed store, hash-verified

18};
19
20export function removeUnset<T extends object>(obj: T): RemoveUnset<T> {
21 return Object.fromEntries(
22 Object.entries(obj).filter(
23 ([_, value]) => value !== null && value !== undefined,
24 ),
25 ) as RemoveUnset<T>;
26}
27
28export function capitalize(str: string): string {
29 return `${str.charAt(0).toUpperCase()}${str.slice(1)}`;

Callers 5

sendToTinybirdFunction · 0.90
sendErrorEventToTinybirdFunction · 0.90
cacheMediaResponseFunction · 0.90
track.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected