Applies numberTransform if the argument is a number, and otherTransform if it is not.
numberTransform
otherTransform
import * as G from "flurp/guard";import * as N from "flurp/number";import * as L from "flurp/logic";const doubleOrUndefined = G.ifIsNumber(N.multiply(2), L.always(undefined);doubleOrUndefined(3); // 6doubleOrUndefined("3"); // undefined
Applies
numberTransform
if the argument is a number, andotherTransform
if it is not.Example