UNPKG

rvx

Version:

A signal based rendering library

20 lines (19 loc) 548 B
import { Signal } from "../core/signals.js"; /** * Create a derived signal for trimming user input. * * + The source signal contains the trimmed value. * + The input signal contains the un-trimmed value. * + Updates are processed until the current lifecycle is disposed. * * @param source The source signal. * @returns The derived input signal. * * @example * ```tsx * import { trim } from "rvx/convert"; * * <TextInput value={someSignal.pipe(trim)} /> * ``` */ export declare function trim(source: Signal<string>): Signal<string>;