@mikuroxina/mini-fn
    Preparing search index...

    Function fromPredicate

    • Creates a new Option from t, but only it will be Some when predicate(t) returns true.

      Type Parameters

      • T

      Parameters

      • predicate: (t: T) => boolean

        The function to decide the value should be contained.

      Returns (t: T) => Option.Option<T>

      The new optional.