UNPKG

rvx

Version:

A signal based rendering library

14 lines 391 B
import { $, watchUpdates } from "../core/signals.js"; export function trim(source) { const input = $(source.value, source); watchUpdates(input, value => { source.value = value.trim(); }); watchUpdates(source, value => { if (input.value.trim() !== value) { input.value = value; } }); return input; } //# sourceMappingURL=trim.js.map