UNPKG

@signaldb/core

Version:

SignalDB is a client-side database that provides a simple MongoDB-like interface to the data with first-class typescript support to achieve an optimistic UI. Data persistence can be achieved by using storage providers that store the data through a JSON in

10 lines (9 loc) 414 B
type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T; /** * Filters out falsy values (`false`, `''`, `0`, `null`, `undefined`) from an array. * @template T - The type of the elements in the array. * @param array - The array to filter. * @returns A new array containing only the truthy values from the input array. */ export default function compact<T>(array: T[]): Truthy<T>[]; export {};