UNPKG

@modular-forms/qwik

Version:

The modular and type-safe form library for Qwik

17 lines (16 loc) 483 B
import { $, implicit$FirstArg } from '@builder.io/qwik'; /** * See {@link toCustom$} */ export function toCustomQrl(action, { on: mode }) { return $((value, event, element) => event.type === mode ? action(value, event, element) : value); } /** * Creates a custom transformation functions. * * @param action The transform action. * @param options The transform options. * * @returns A transformation functions. */ export const toCustom$ = implicit$FirstArg(toCustomQrl);