@maverickcer/env-cap
    Preparing search index...

    Variable processorsConst

    processors: {
        base64: () => Processor<Buffer<ArrayBufferLike>>;
        parseJSON: <T = unknown>() => Processor<T>;
        split: (separator?: string) => Processor<string[]>;
        toArray: <T>(
            separator?: string | RegExp,
            processors?: Processor<unknown>[],
        ) => Processor<T[]>;
        toBigInt: () => Processor<bigint>;
        toBoolean: () => Processor<boolean>;
        toDate: () => Processor<Date>;
        toInteger: () => Processor<number>;
        toLowerCase: () => Processor<string>;
        toNumber: () => Processor<number>;
        toRegExp: () => Processor<RegExp>;
        toString: () => Processor<string>;
        toUpperCase: () => Processor<string>;
        toURL: () => Processor<URL>;
        trim: () => Processor<string>;
    } = ...

    Convenience runtime.Processor implementations for common coercion patterns (e.g. processors.toNumber()).

    Type Declaration

    • base64: () => Processor<Buffer<ArrayBufferLike>>

      Decodes a base64 string into a Buffer.

    • parseJSON: <T = unknown>() => Processor<T>

      Parses a JSON string; passes non-string values through unchanged.

    • split: (separator?: string) => Processor<string[]>

      Splits a string on separator into a trimmed string array; returns [] for non-string input.

    • toArray: <T>(
          separator?: string | RegExp,
          processors?: Processor<unknown>[],
      ) => Processor<T[]>

      Splits a delimited string (or passes through an array) into items, running each through processors in order.

    • toBigInt: () => Processor<bigint>

      Coerces a value to a bigint.

    • toBoolean: () => Processor<boolean>

      Coerces common boolean-like strings (true/1/yes/on, and their opposites) into a real boolean.

    • toDate: () => Processor<Date>

      Parses a value into a Date.

    • toInteger: () => Processor<number>

      Coerces a value to a number and requires it to be an integer.

    • toLowerCase: () => Processor<string>

      Lowercases a string (coercing nullish values to "" first).

    • toNumber: () => Processor<number>

      Coerces a value to a number, rejecting empty/whitespace-only strings instead of silently resolving to 0.

    • toRegExp: () => Processor<RegExp>

      Compiles a value into a RegExp.

    • toString: () => Processor<string>

      Coerces a value to a string, treating nullish values as "".

    • toUpperCase: () => Processor<string>

      Uppercases a string (coercing nullish values to "" first).

    • toURL: () => Processor<URL>

      Parses a value into a URL, treating nullish values as "" first.

    • trim: () => Processor<string>

      Trims surrounding whitespace from a string (coercing nullish values to "" first).

    Naming matches data-cap's helpers.processors -- but these throw with a formatted Error message on invalid input, where data-cap's silently return undefined. Do not assume the same failure mode when moving between packages.