• Convert pounds or kilograms weight to the opposite regardless of what configuration is used.

    Parameters

    • value: number

      Pounds or kilos

    • type: "kg" | "lbs"

      Type the value is in

    Returns number

    • Pounds or kilos, opposite of what set type was

    Example

    pf1.utils.swapWeight(5, "kg"); // => 10
    pf1.utils.swapWeight(10, "lbs"); // => 5

    Throws

    • On invalid parameters.

Generated using TypeDoc