trilogy
Version:
TypeScript SQLite layer with support for both native C++ & pure JavaScript drivers.
15 lines (14 loc) • 998 B
TypeScript
import * as types from './types';
export declare function mapObj<T extends types.LooseObject, R extends T>(collection: T, fn: (value: T[keyof T], key: keyof T) => R[keyof R]): R;
export declare const isObject: (value: any) => value is Record<string, any>;
export declare const isFunction: (value: any) => value is Function;
export declare const isString: (value: any) => value is string;
export declare const isNumber: (value: any) => value is number;
export declare const isNil: (value: any) => value is null | undefined;
export declare const isEmpty: (value: any) => boolean;
export declare const toArray: <T>(value: T | T[]) => NonNullable<T>[];
export declare const firstOrValue: <T>(value: T | T[]) => T;
export declare type Falsy = false | null | undefined | 0 | '';
export declare function invariant(condition: Falsy, message?: string): never;
export declare function invariant<T>(condition: T, message?: string): T;
export declare function makeDirPath(path: string): boolean;